NetSuite SuiteCommerce: Access and get Data From Custom Record List

倾然丶 夕夏残阳落幕 提交于 2019-12-25 04:12:15

问题


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)-->

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?

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


回答1:


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.

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.

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.

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.



来源:https://stackoverflow.com/questions/40888097/netsuite-suitecommerce-access-and-get-data-from-custom-record-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!