2022.2

Table Of Contents
therecordparameterareupdatedinthedatabase,whilethecontentsofallotherfieldsremain
unchanged.
Thecallfailsiftheparameterisomittedorempty,ifanyofthefieldsspecifiedintherecorddoesn't
existintheDataModel,orifavaluecannotbeconvertedtothedatatypethatisexpectedinafield.
About data types
Wherepossible,valuesareautomaticallyconvertedintothedatatypeoftherespectivedatafield.
Note: DatesmustbepassedasaDateobjecttoallowthemtobeextractedintoaDatefield.See
DateintheMozillahelpfiles.
Passinganimproperdatatypetriggersanerror.Forinstancethefollowingobjectsareallinvalid:
{ myBoolean : "true" }-ThemyBooleanfieldisbooleanandexpectsaboolean,notastring
{ myDate : "2021-03-29" }-ThemyDatefieldisadateandexpectsaDateobject:myDate:
new Date(2021,2,29),notastring
{ myPageCount : 2.5 }-ThemyPageCountfieldisanintegerandexpectsanumberwithoutany
decimals
{ myPrice : "19.99" }-ThemyPricefieldisacurrencyandexpectsanumbervalue,notastring
Example
record.set({customerName : "John Doe", customerAddress : "123 test road"});
Thefollowingexampleaddsarowtoadetailtableandsetssomevaluesinit.
var row = record.tables.myDescriptions[i].addRow();
record.tables.myDescriptions[row].set({customerName : "John Doe", customerAddress : "123 test road"});
setCopy(i, record)
Thismethodoftherecordobjectsetsfieldvaluesinacopyofthecurrentrecordinthemaindataset.
(Seealso:"record"onthenextpage.)
Note: Thismethodcannotbeusedinpost-processorscripts,becauseitoperatesonthecurrent
recordbeforeitiswrittentothedatabase.
i
Theindexoftherecordcopy(0-based;theoriginalrecordhasanindexof0).
record
Page 392