Vedachalam Mahadevan
03/11/2025, 1:48 AMCeligo AI
03/11/2025, 1:48 AMAI generated answer (using internal Slack threads):In NetSuite SuiteScript 2.0, you can get the value of a custom body field without loading the entire invoice record by using the
record.load
function. However, this function is not available in SuiteScript 2.0. Instead, you can use the search.lookupFields
function. This function allows you to retrieve one or more field values from a record without loading the entire record.
Here is an example of how you can use this function:
javascript
var fieldValues = search.lookupFields({
type: search.Type.INVOICE,
id: 'your_invoice_id',
columns: 'custbody_your_custom_field'
});
var customFieldValue = fieldValues.custbody_your_custom_field;
In this example, replace 'your_invoice_id'
with the ID of the invoice you want to retrieve the custom field value from, and replace 'custbody_your_custom_field'
with the ID of your custom body field.
******
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
03/11/2025, 1:48 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810821414
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.802802622
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.802431703
Celigo AI
03/11/2025, 1:48 AM