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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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