I have a script that has been working for many mon...
# suitescript
b
I have a script that has been working for many months. Today, without any changes, it decides to start throwing errors : You have entered an Invalid Field Value 4700.0 for the following field: risk_item_qty. If I write the variable to the log, it shows up as a 4700, no decimal, which is expected. Any thoughts on what is causing this now?
Copy code
slItems.addField({
                     id: 'risk_item_qty',
                     type: ui.FieldType.INTEGER,
                     label: 'Quantity'
                 });

                 for(let i=0; i<orderDetails.riskItems.length; i++){
                     let riskItem = orderDetails.riskItems[i];
                     let riskQty = parseInt(riskItem.itemQuantity);

                     slItems.setSublistValue({
                         id:'risk_item',
                         line:i,
                         value:riskItem.itemName
                     });
                     slItems.setSublistValue({
                         id:'risk_item_qty',
                         line:i,
                         value:riskQty
                     });
                 }
b
probably want to start with hardcoding orderDetails to what you think it should be