Mass Update Custom Form on Existing Transactions via Mass Update Script

Written by
Denise Cuarto
Published on
March 10, 2023 at 6:18:10 AM PST March 10, 2023 at 6:18:10 AM PSTth, March 10, 2023 at 6:18:10 AM PST

SCENARIO

A user prefers to use a single form for all transactions (new and existing) as other custom forms need to be inactivated.

SOLUTION

Create a Mass Update script that can be triggered manually to update the value of the custom form field on existing transactions.

Below is a Mass Update script deployed on the Vendor Bill. Once executed, it should update Vendor Bills and set the form to the custom form specified in the script.

function setCustomForm(rec_type, rec_id){ var vendBill = record.load({ type: record.Type.VENDOR_BILL, id: rec_id }); var trans = vendBill.setValue({ fieldId: 'customform', value: 108 }); //If 108 is the ID of the Custom Form var recID = vendBill.save(); log.debug({ title: 'Record ID', details: recID }); }

Disclaimer

The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.

Oracle + NetSuite Inc. does not warrant, guarantee, or make any representations regarding the use, results of use, accuracy, timeliness, or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.

Oracle + NetSuite Inc. shall not be liable for any direct, indirect, or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.