2022.1

Table Of Contents
Note
Dates must be passed as a Date object to allow them to be extracted into a Date field.
See Date in the Mozilla help files.
Passing an improper data type triggers an error. For instance the following objects are all
invalid:
{ myBoolean : "true" } - The myBoolean field is boolean and expects a boolean, not a string
{ myDate : "2021-03-29" } - The myDate field is a date and expects a Date object:myDate:
new Date(2021,2,29), not a string
{ myPageCount : 2.5 } - The myPageCount field is an integer and expects a number without
any decimals
{ myPrice : "19.99" } - The myPrice field is a currency and expects a number value, not a
string
Example
record.copies = 3;
var oneRec = {CopyFor:'',Note:''};
for(var i=0;i<record.copies;i++){
switch (i) {
case 0:
oneRec.CopyFor = "Customer";
oneRec.Note = "Payment due in 30 days";
break;
case 1:
oneRec.CopyFor = "Administration";
oneRec.Note = "Due date set to 30 days";
break;
case 2:
oneRec.CopyFor = "Archive";
}
record.setCopy(i, oneRec);
}
Page 449