|
|
Syntax
cmdUpdate.execute([doScripts])
Arguments |
Description |
doScripts |
If
doScripts is TRUE,
the scripts associated with the table's BeforeUpdate and AfterUpdate functions will run on the rows modified. If
FALSE,
the table's scripts are not run. The default value is TRUE. |
|
Returns
The
return value is undefined.
Description
Executes
the update, as specified by the cmdUpdate object's
filter and field settings. Note that an exception will be thrown if the filter settings are not specified.
Example
The following example updates the data table "AddressBook", writing the email address "johnsmith@address.com" to each record where the LastName field has the value "John" and the LastName field has the value "Smith". In this case, any BeforeUpdate and AfterUpdate functions associated with the data table "AddressBook" will not execute, because the argument for the execute() method has the value "false".
var upd = new cmdUpdate ("AddressBook");
upd.setFilter({LastName:"Smith",FirstName:"John"});
upd.setFields({Email:"JohnSmith@address.com"});
upd.execute(false);
Related
Topics
cmdUpdate Object,
cmdUpdate.setFilter(), cmdUpdate.setFields()
|