Automate values on inventory adjustment Record in NetSuite

A Customer want to automate few values on the inventory adjustment record here I am writing few updates on how easily you can achieve the customization via User event or Client script.  Here we choose  Adjustment Account, fielded: Account (Select the appropriate account for inventory adjustments. Usually, this will be an expense account. For details on accounts, go to Setup > Accounting > Chart of Accounts.) and

 Adjustment Location Field id: Adjlocation( To select the location to associate with this adjustment transaction:

1.Select New to enter a new location.

2.Go to Setup > Company > Locations for information on existing locations.)

The values for the fields of Account and Adjlocation of Inventory Adjustment records are dependent on the Subsidiary record. Thus, to set the values via a Client script, it is needed to set the Subsidiary value first via a User Event script before setting the value of Account and Adjlocation via postSourcing. this can be Achieved via Client and User Event scripts:

User Event Script:

define([ ‘N/error’ ], function(error) {

              function beforeLoad(scriptContext) {

                             var MyRecord = scriptContext.newRecord;


                                           fieldId : ‘subsidiary’,

                                           value : 123,

                                           ignoreFieldChange : true,

                                           fireSlavingSync : true



                                           title : ‘Debug’,

                                           details : ‘Account ‘



                                           fieldId : ‘account’,

                                           value : 999,

                                           ignoreFieldChange : true,

                                           fireSlavingSync : true



              return {

                             beforeLoad : beforeLoad



Reference :, netsuite help  and netsuite guide.

Feel free to reach out Netsuite Solution provider  TheSmilingCoders for proper netsuite implementationnetsuite consultation , netsuite customizationnetsuite Supportnetsuite Training NetSuite Celigo Integration , Celigo ConsultantCeligo Integration Consultant.

contact us :

Facebook :

Linkedin :

Leave a Reply