Record.save.promise(options)
Method Description |
Submits a new record asynchronously or saves edits to an existing record asynchronously. This method is not available to subrecords.
Note:
The parameters and errors thrown for this method are the same as those for Record.save(options). For more information about promises, see Promise Object. |
Returns |
|
Synchronous Version |
|
Supported Script Types |
Client scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
Transaction records: 20 units Custom records: 4 units All other records: 10 units |
Module |
|
Sibling Object Members |
|
Since |
2015.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
boolean |
optional |
Enables sourcing during the record update. If set to Defaults to
Important:
This parameter applies to records in standard mode only. When working with records in dynamic mode, field values are always sourced and the value you provide for |
2015.2 |
|
boolean |
optional |
Disables required field validation for this save operation. If set to By default, this parameter is
Important:
Use the ignoreMandatoryFields argument with caution. This argument should be used mostly with Scheduled scripts, rather than User Event scripts. This ensures that UI users do not bypass the business logic enforced through form customization. |
2015.2 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete promise script example, see Promise Object.
// Add additional code
...
var recordId = objRecord.save.promise({
enableSourcing: true,
ignoreMandatoryFields: true
});
...
// Add additional code