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
Please Help With Simple LineItem Script
I'm trying to add a script to sales orders that warns the employee that adding the item called "MISC" without prior approval is against company procedure.
I did verify that the script is running by removing my if statement and just ran the alert- that worked. It seems like I messed up my value call.
It seems pretty straightforward but I'm struggling with it... any thoughts?
function monitorMisc(type) { var iname = nlapiFindLineItemValue('item', 'name', '1'); if(iname == "MISC") { alert("Adding the item MISC is against company procedure, unless approved first."); } return true; } 0