NetSuite SuiteCommerce: Access and get Data From C

2019-09-04 18:11发布

问题:

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.