give complete suitescript 1.0 script. ```transacti...
# ask-stanley-ai
v
give complete suitescript 1.0 script.
Copy code
transactionRecord.selectLineItem('expense', 1);

    transactionRecord.setCurrentLineItemValue('expense', 'folder', 'default_folder_id'); // Replace with the actual field id and folder id

    transactionRecord.commitLineItem('expense');
c
AI generated answer (using internal Slack threads):
Based on the provided Slack threads, here is a complete SuiteScript 1.0 script:
Copy code
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. ******
Slack 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
Please provide your feedback on this answer.