NetSuite SuiteCommerce:从自定义记录列表访问并获取数据 [英] NetSuite SuiteCommerce: Access and get Data From Custom Record List

查看:98
本文介绍了NetSuite SuiteCommerce:从自定义记录列表访问并获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想创建&通过-

We would like to create & access custom db table structure for our SuiteCommerce Advance Site as-

Custom Record--> 
                List 1--> Value1, Value2.....Value(n) 
                List 2--> Value1, Value2.....Value(n)
                List 3--> Value1, Value2.....Value(n)
                          .
                          .
                          .
                List (n)-->

然后,我们需要搜索存储在列表1中的值,并将它们与另一个进行比较.以列表1的值为基础来获得期望结果的最佳存储方式是什么?另外,我们可以使用哪个SuiteScript API来获取这些自定义记录db及其接受值?

Then we need to search the values stored in List 1 and compare those with another. What could be the best way to store values in such way that will get the desired result based on List 1 values? Also, Which SuiteScript API we can use to get these custom record db and its receptive values?

nlapiGetFieldValues对我有用吗?如果可以的话,我们该如何使用呢?

Is nlapiGetFieldValues is usable to me? and if yes how we can use that?

推荐答案

最快的方法是使用Suitelet,根据SS1或SS2使用nlapiSearchRecordN/search.

The quickest way to go about this is to use a Suitelet making use of either nlapiSearchRecord or N/search depending on SS1 or SS2.

您将以JSON格式返回结果,并以正常的AJAX调用方式从客户端脚本中调用Suitelet网址.您可以使用任何喜欢的客户端技术对其进行格式化.

You would return the results as JSON and invoke the Suitelet url from your client script as a normal AJAX call. You can format it using whatever client side technology you like.

如果您正在使用Sitebuilder,则另一种方法是创建一个自定义搜索选项卡来搜索记录,并且如果您必须将任何内容传递回服务器,则仍然需要Suitelet.

If you are using Sitebuilder another way is to create a custom search tab that searches for the records and if you have to pass anything back to the server you'll need the Suitelet anyway.

如果您正在使用SuiteCommerce Advanced,那么更好的方法是在SCA中创建一个模块来管理搜索和更新.我认为您仍然必须在模块的service.ss文件中使用SS1(nlapiSearchRecord),但是创建自定义模块可以让您移动列表显示,而对其他模块的影响最小.

If you are using SuiteCommerce Advanced then the better way is to create a Module in SCA to manage the search and update. I think you still have to use SS1 (nlapiSearchRecord) in the module's service.ss files but creating a custom module allows you to move your list presentation around with minimal impact on other modules.

这篇关于NetSuite SuiteCommerce:从自定义记录列表访问并获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆