LaxDataService

LaxDataService

new LaxDataService()

Source:

The container of the actual Lightning Data Service (LDS). It delegates actions to LDS and provide and API to chain them. Actions callback functions don't require $A.getCallback() wrapper.

Methods

deleteRecord() → {LaxPromise}

Source:

The function to delete a record using LDS.

Returns:
Type
LaxPromise

getNewRecord(sobjectTypeopt, recordTypeIdopt, skipCacheopt) → {LaxPromise}

Source:

The function to load a record template to the LDS targetRecord attribute. It doesn't return a result to callback function. It simply prepares an empty record and assigns it to the targetRecord attribute.

Parameters:
Name Type Attributes Description
sobjectType String <optional>

the object API name for the new record.

recordTypeId String <optional>

the 18 character ID of the record type for the new record. If not specified, the default record type for the object is used, as defined in the user’s profile.

skipCache Boolean <optional>

whether to load the record template from the server instead of the client-side Lightning Data Service cache. Defaults to false.

Returns:
Type
LaxPromise

saveRecord() → {LaxPromise}

Source:
See:

The function to save the record that loaded to LDS edit EDIT mode. It used to create a record and save it or to save the changes to an existing one.

Returns:
Type
LaxPromise