generateRecordInputForCreate(record, objectInfo)

Generates a representation of a record (Record Input) that can be used to create a record using createRecord(RecordInput). Passing in ObjectInfo filters the Record Input to only fields that are createable.

Here's the table in markdown format:

Parameter NameTypeDescriptionRequired?
recordObjectA Record object that contains source data. To get data to build the Record object, use the getRecordCreateDefaults.Yes
objectInfoObjectThe ObjectInfo corresponding to the apiName on the record. If provided, only fields with the property createable=true (excluding Id) are included in the response.

A Record Input object with its data populated from the given record. Returns all fields whose values are not nested records.

Return the Record Input object on a contact record.

The object returned for a contact record by calling generateRecordInputForCreate with the value from getRecordCreateDefaults looks like this.