Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update line item field from body field
The below updates all line item descriptions from the body memo field using a client script with a 'field changed function' and is deployed on the sales order. I would like to change this to trigger on save instead. I have tried to change to 'save record function' but it doesnt work. I have also tried to change the script type to an event script with no joy.
function description(type,name){ if (name == 'memo'){ var description = nlapiGetFieldValue('memo'); var count = nlapiGetLineItemCount('item'); if (count > 0){ for (var x = 1; x <= count; x++){ nlapiSelectLineItem('item', x); nlapiSetCurrentLineItemValue('item', 'description', memo.value, false, true); nlapiCommitLineItem('item'); } } } } 0