submitFields in Suite Script 2.0 with example

Hello friends,

In Suite Script 1.0 , using nlapiSubmitField was easy, few people messaged us regarding how to use submitFields in SS 2.0,
So here is example of submitFields where more than 1 field is getting update:


 record.submitFields({
                                type: record.Type.EMPLOYEE,
                                id: 123123,
                                values: {
                                    custentity_freeformtext: 'free from text field',
                                    custentity_select_field: 1,
                                    custentity_multiselect_field: [1,2],
                                    custentity_checkbox_field: true                                  
                                },
                                options: {
                                    enableSourcing: false,
                                    ignoreMandatoryFields : true
                                }
                            });

**** Please keep field type in mind and use only as per valid input, else it will throw error.

Please let us know if this small piece of code work for you.

Thanks
Team Netsuite Guru

Download Netsuite Guru Android App
Follow Me on Linkedin
Our FB Page

Comments