Hi all,
I want to add item discount automatically when I click save button on salesorder, .
I have created some script on event save record, continue to postsourching, .
function mySaveRecord() { nlapiSelectNewLineItem('item'); nlapiSetCurrentLineItemValue('item', 'item', '2402'); } function postSourcing(type, name) { if(type=='item' && name=='item') { if (nlapiGetCurrentLineItemValue('item','item') == '2402') { nlapiSetCurrentLineItemValue('item', 'rate','-100'); nlapiSetCurrentLineItemValue('item', 'taxcode','8'); nlapiCommitLineItem('item'); } } } When I running script above I got error, .My browser didn't work and not responding, .:h_a_w:but sometime, there is no error but item can't be add, .Is there some one can help my problem ??