Lorenzo
02/04/2025, 4:26 PMCeligo AI
02/04/2025, 4:26 PMAI generated answer (using internal Slack threads):To get related records of a Sales Order via REST API, you can use SuiteQL queries through REST Web Services. However, it's important to note that Sales Orders do not have a direct link to the fulfillment in them, and Item Fulfillments are not filterable by 'createdFrom'. Here is a link to the NetSuite Help Center that provides more information on how to execute SuiteQL queries through REST Web Services: [Executing SuiteQL Queries Through REST Web Services](https://system.netsuite.com/app/help/helpcenter.nl?fid=section_157909186990.html) In SuiteScript, you can try using the 'Applied To' or 'Applying To' field on a search to get related records from any transaction record. However, the 'Related Records' tab is not part of the record object, so you cannot access the related record tab items as you do with line items for items tab. Here is a sample code snippet for SuiteScript:
javascript
var salesRec = nlapiLoadRecord('salesorder', salesOrderId);
var relatedRecordId = salesRec.nlapiGetFieldValue('item', itemId);
Please replace 'salesOrderId' and 'itemId' with your actual Sales Order ID and Item ID.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/04/2025, 4:27 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.857156456
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.854502738
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829164863
Celigo AI
02/04/2025, 4:27 PM