Ali
11/29/2019, 12:24 PMec
11/29/2019, 1:40 PMscottvonduhn
11/29/2019, 2:36 PMfunction setValues(nsRecord, values) {
util.each(values, function(value, fieldId) {
nsRecord.setValue({ fieldId: fieldId, value: value });
});
}
setValues(taskRecord, {
title: 'Task Title',
priority: 'HIGH',
company: customerId,
assigned: employeeId,
startdate: new Date(),
sendemail: false
});
Ali
11/29/2019, 2:43 PMJohnnyC
11/29/2019, 7:12 PMscottvonduhn
11/29/2019, 7:40 PMrecord.submitFields
The beauty of programming languages, though, is the ability to extend functionality to your liking, and this is something that makes my code cleaner, so I'll gladly do it where it makes sense (usually when setting three or more fields at a time)