I have created a suitelet script in which the line items in assembly build are set in the suitelet multiplied by quantity. i.e. if there is quantity 2 then two lines will be setting in suitelet for that item. suitelet opens by clicking save.
The problem is if there are more items in the assembly build then suitelet wont open and throws the error USAGE_LIMIT_EXCEEDED.
I tried to reduce the script code but it didnt help
var b=0;var nItemLinesCount = objRecord.getLineCount({ sublistId: 'component' }); for(var i=0; i<nItemLinesCount; i++)
{
if(Qty > 0)
{
for(j=0; j<Qty; j++)
{
sublist.setSublistValue({
id : 'custpage_item',
line : b,
value : nItem
});
sublist.setSublistValue({
id : 'custpage_qty',
line : b,
value : '1'
}); b++;
}
}
}