Hi Team, How to read custom sublist created by sa...
# suitescript
p
Hi Team, How to read custom sublist created by saved search from the custom record ? When we are loading Custom record by nlapiLoadRecord API it is not showing the sublist added by a saved search. sublist is successfully added and visible in UI. var custRec = nlapiLoadRecord('RecordID',internalid)  //Custom record has one child record and custom sublist record custRec.getAllLineItems()   // Not getting any info about custom sublist where as child record name is loaded Is there any way to access the custom sublist and perform an operation on sublist?
b
That should be no. Those are static list type sublists and they don't have suitescript support.
s
They aren't actually stored on the record, they are being run on page load and showing you the data. That is why you cannot get them when accessing the record via API. If you need the same data, just load and run the same search in the code.
p
Thanks for the quick reply. I have still left with 1 doubt. Standard records have sublists such as Customer records with the below sublist. "addressbook", "creditcards", "contactroles", "currency", "salesteam" Can't we create such a sublist and perform an operation like performing operation on the Standard record sublist?
b
you might want to take a look at Sublist Types
a custom sublist is a static list type sublist, (like the contactroles) cannot be manipulated. You can't add to them like in normal sublists
addressbook, credit cards, currency, salesteam, and probably your parent/child relationship custom record are inline editor sublists
they behave like normal sublists and are mostly scriptable
credit card one will act a little strange since it has some special functionality
if you want a scriptable custom sublist, use Custom Child Record Sublist Creation with SuiteScript