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: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Adding Items to Cart Validation
I am working on writing a scriptable cart script. It currently does (or is suppose to do) 2 things, it won't let you add a specific item to the cart and it won't let you add something that is already in the cart to the cart. Here is the script:
function customValidateLine(type) { if (type != 'item') { return true; } var itemId = nlapiGetCurrentLineItemValue('item','item'); if (itemId == "302"){ return false; } var qty = parseInt(nlapiGetCurrentLineItemValue('item','quantity')); if (qty > 1){ return false; } return true; } Currently the qty part of script works. It returns an error saying line validation failed. Item 302 is still allowed to be added to the cart.
0