Kevin Baxter
06/07/2023, 4:57 PMconst beforeSubmit = (scriptContext) => {
var newRecord = scriptContext.newRecord
var oldRecord =scriptContext.oldRecord
var standardRoyalty = newRecord.getValue({
fieldId: 'custrecord_lf_school_std_roy_perc'
});
var headwearRoyalty = newRecord.getValue({
fieldId: 'custrecord_lf_school_hdwr_roy_perc'
})
const schoolName = newRecord.getValue({
fieldId: 'custrecord_lf_school_name'
});
var id = record.submitFields({
type: record.Type.CUSTOMER,
id: customerId,
values: {
'custentity_lf_hdwr_roy_new': headwearRoyalty,
'custentity_lf_std_roy_rate_new': standardRoyalty
}
}
ec
06/07/2023, 7:37 PMcustomerId
defined? what record is this executing on?David B
06/07/2023, 10:49 PM