Vedachalam Mahadevan
03/22/2025, 3:10 AMtransactionRecord.selectLineItem('expense', 1);
transactionRecord.setCurrentLineItemValue('expense', 'folder', 'default_folder_id'); // Replace with the actual field id and folder id
transactionRecord.commitLineItem('expense');
Celigo AI
03/22/2025, 3:10 AMAI generated answer (using internal Slack threads):Based on the provided Slack threads, here is a complete SuiteScript 1.0 script:
javascript
function setLineItemFields(type) {
var transactionRecord = nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId());
transactionRecord.selectLineItem('expense', 1);
transactionRecord.setCurrentLineItemValue('expense', 'folder', 'default_folder_id'); // Replace with the actual field id and folder id
transactionRecord.commitLineItem('expense');
return true;
}
This script selects the first line of the 'expense' sublist on a transaction record, sets the 'folder' field to a specific value (replace 'default_folder_id' with the actual folder id), and then commits the line item.
******
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/22/2025, 3:10 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829125464
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827991128
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826289952
Celigo AI
03/22/2025, 3:10 AM