Nada Ahmed
06/14/2025, 2:08 PMCeligo AI
06/14/2025, 2:08 PMAI generated answer (using internal Slack threads):To source the header memo to the line description in NetSuite, you can use SuiteScript. The 'memo' field ID is used for the line level (sublist) description, and 'Memo (main)' is the memo at the header level. If you want to copy the memo from the header to each line, you can use a User Event script that triggers after the record is submitted. In this script, you can get the value of the header memo and then set this value to each line's memo field. Here is a sample SuiteScript 2.0 code:
javascript
/**
* @NApiVersion 2.x
* @NScriptType UserEventScript
*/
define(['N/record'], function(record) {
function afterSubmit(context) {
var newRecord = context.newRecord;
var headerMemo = newRecord.getValue('memo');
var lineCount = newRecord.getLineCount({sublistId: 'item'});
for (var i = 0; i < lineCount; i++) {
newRecord.setSublistValue({
sublistId: 'item',
fieldId: 'description',
line: i,
value: headerMemo
});
}
record.submitFields({
type: newRecord.type,
id: newRecord.id,
values: {
'item': newRecord.getSublist('item')
}
});
}
return {
afterSubmit: afterSubmit
};
});
This script gets the header memo value and sets it as the description for each line item. Please note that this script should be deployed on the record type where you want this functionality.
******
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
06/14/2025, 2:08 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.83604908
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829887331
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827075124
Celigo AI
06/14/2025, 2:08 PM