createRecord(recordInput)
Creates a record.
recordInput
—(Required) A RecordInput object used to create the record. To create a RecordInput object, usegenerateRecordInputForCreate(record,objectInfo)
.
createRecord
uses this User Interface API resource, but doesn’t support all its parameters.
A Promise object that resolves with the created record. The record contains data for the fields in the record layout.
Before you use this wire adapter, make sure there isn’t an easier way to create the data. Consider the lightning-record-*-form
components to work with records.
See Build Custom UI to Create and Edit Records for an example.
See Also