Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Unassociate dormant bins
Hey Guys and girls, I'm looking to know if a helpful member will give me some advice on an issue that I've been working at for a few days now;
My idea is simple and I'm sure it would benefit other NetSuite users also.
Here is the draft userEvent script that I've been working on.:o
<span style="font-size:'"2"'">//This user event script renders bins available if there are no items left onhand in their respective bin. function userEventAfterSubmit(ItemFulfillment) { try { var fulfillment = nlapiGetNewRecord(); if (type == 'create') { var items = new Array(); var qtys = new Object(); for ( var int = 1; int &lt;= fulfillment.getLineItemCount('item'); int++) { var qoh = fulfillment.getLineItemValue('item','quantityonhand', int); if (qoh &gt; 0) { return; } else { fulfillment.SetCurrentLineItemValue('item', 'usebins', false); } } } } catch (e) { nlapiLogExecution('ERROR',e.getCode(),e.getDetails()); } } </span>