Script for FInancial Institution record creation

     // Create a financial institution record

var newFIRecord = record.create({

  type: record.Type.FINANCIAL_INSTITUTION,

  isDynamic: false,

  defaultValues: null

}).setValue({

  fieldId: ‘financialinstitution’,

  value: ‘New XYZ Bank’

}).setValue({

  fieldId: ‘description’,

  value: ‘Description for XYZ Bank’

}).save();

 

// Load a financial institution record

var createdFIRecord = record.load({

  type: record.Type.FINANCIAL_INSTITUTION,

  id: 1,

  isDynamic: false

});

// Get value of the description field

var description = createdFIRecord.getValue({

  fieldId: ‘description’

});

 

// Update the description field

 createdFIRecord.setValue({

  fieldId: ‘description’,

  value: ‘Edited Description for XYZ Bank’

});

var recId = createdFIRecord.save(); 

Leave a comment

Your email address will not be published. Required fields are marked *