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.
ASK:Error On Simple Script
Dear All,
Im newbie to scripting.
We are trying to stop all transaction, if our employee try to sale the item below the purchase price or last purchase price.
I try to make 1 simple script and add itu to custom form, but not working.
can any body help me, whats wrong with my script ?
function saleprices () { var sale = nlapiGetCurrentLineItemValue(rate,rate,1); var buy = nlapiGetCurrentLineItemValue(currency,lastpurchaseprice,1); if (sale < buy ) {alert('The price below purchase price'); return false} return true; } Thanks for all help
0