Promise
Updates the Record from the context, or from a base record if provided
Kind: global function
Returns: Promise
- A promise that resolves to a related Backbone.Model
and rejects to a javascript error class
See: getRecord
Since: v0.0.1
Param | Type | Description |
---|---|---|
options | ||
options.baseRecord | Boolean |
A Backbone.Model |
options.updateAttributes | Boolean |
The attributes you want updated |
Example
// update by injecting a baseRecord
const myMeeting = { name: 'test', ...otherAttributes }
await updateRecord({ record: myMeeting, updateAttributes: { name: 'updatedName' } });
// inside of an account record
await updateRecord({ updateAttributes: { name: 'another updated name' }})