function afterSubmit(context) {
var recobj=context.newRecord;
var recid=recobj.id;
log.debug("recid",recid);
function test() {
var So_Rec = record.load({
type: record.Type.VENDOR_BILL,
id: recid,
isDynamic: true,
});
So_Rec.selectLine({
sublistId: 'expense',
line: 0
});
So_Rec.setCurrentSublistValue({
sublistId: 'expense',
fieldId: 'custcol_expense_url',
value: "https://www.googlggggggggggggggggggggggge.com",
});
So_Rec.commitLine({ sublistId: 'expense', ignoreRecalc: false });
var so_RecId = So_Rec.save({
enableSourcing: true,
ignoreMandatoryFields: true
})
log.debug('rec saved', so_RecId);
}
test();
log.debug('test() function end');
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter