how to source header memo to the line description ...
# ask-stanley-ai
n
how to source header memo to the line description in a custom transaction (basic type)
c
AI generated answer (using internal Slack threads):
To source the header memo to the line description in a custom transaction (basic type), you can use SuiteScript. First, you need to get the value of the header memo field. In SuiteScript 2.0, you can use the
getValue
method to get the value of a field. Here is an example:
Copy code
javascript
var record = record.load({
    type: record.Type.SALES_ORDER, 
    id: '123'
});
var memo = record.getValue({
    fieldId: 'memo'
});
Then, you need to set the value of the line description field. You can use the
setSublistValue
method to set the value of a sublist field. Here is an example:
Copy code
javascript
record.setSublistValue({
    sublistId: 'item',
    fieldId: 'description',
    line: 0,
    value: memo
});
Finally, you need to save the record. Here is an example:
Copy code
javascript
record.save();
Please note that you need to replace
'123'
with the actual ID of your record, and
'item'
with the actual ID of your sublist. Also, you need to replace
'0'
with the actual line number where you want to set the value. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834858716
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821997643
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818129241
Please provide your feedback on this answer.