The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.


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.

  • record—(Required) A Record object that contains source data. To get data to build the Record object, use the getRecordCreateDefaults or getRecord.

  • objectInfo—(Optional) The ObjectInfo corresponding to the apiNameon the record. If provided, only fields that arecreateable=true(excludingId) 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.