The ID of the record type (RecordType object) for the new record. If not provided, the default record type is used.
optionalFields
String[]
An optional array of field names. If an optional field is accessible to the context user, it’s included in the response. Specify names in the format ['ObjectApiName.FieldName'].
Read the data that’s returned by the wire adapter using a property or function.
propertyOrFunction—A private property or function that receives the stream of data from the wire service.
If a property is decorated with @wire, the results are returned to the property’s data property or error property.
If a function is decorated with @wire, the results are returned in an object with a data property and an error property.
To create UI that lets a user create a record, first get information about which fields are required. This adapter’s response contains the default field values for a new record of the object type specified in {apiName}. It also contains object metadata and the corresponding layout for Create mode. In the Salesforce user interface, an admin with “Customize Application” permission can mark a field as required in a layout. When you’re building UI, to determine which fields to mark as required in a layout for create and update, use the ObjectInfo.fields[fieldName].required property.
The ldsGenerateRecordInputForCreate component in the lwc-recipes repo shows an example on how to use getRecordCreateDefaults.
This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.