Good Day! I'm using record.create for an Inventory...
# suitescript
r
Good Day! I'm using record.create for an Inventory Adjustment.
Copy code
var IARec = record.create({
                        type          : record.Type.INVENTORY_ADJUSTMENT,
                        isDynamic     : true,
                    });
                    IARec.setValue({
                        fieldId : 'subsidiary',
                        value   : 3
                    });
                    IARec.setValue({
                        fieldId : 'customform',
                        value   : 161
                    });
                    IARec.setValue({
                        fieldId : 'memo',
                        value   : 'TEST123456789'
                    });
                    IARec.setValue({
                        fieldId : 'account',
                        value   : 888
                    });
I received and Error : "You have entered an Invalid Field Value 888 for the following field: account" The account is also set to the Subsidiary. Thanks for the help!
1
b
create an inventory adjustment in the ui and set the fields in the same order you do in script
🙌 1
for a visual of the problem
r
thanks! that helped @battk