Get Default Values to Clone a Record
The response contains the default field values for a record cloned from the record specified in {recordId}, optionally of the specified recordTypeId.
It also contains the corresponding layout information for edit 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 edit mode, use the RecordLayoutItem.required property.
/ui-api/record-defaults/clone/001d000000AtfRIAAZ
- Resource
-
/ui-api/record-defaults/clone/{recordId}
- Available Version
- 41.0
- HTTP Method
- GET
- Request Parameters
-
Parameter Name Type Description Required or Optional Available Version formFactor String The layout display size for the record. One of these values: - Large—(Default) Use this value to get a layout for desktop display size.
- Medium—Use this value to get a layout for tablet display size.
- Small—Use this value to get a layout for phone display size.
Optional 41.0 optionalFields String[] A collection of optional field names. If a field is accessible to the context user, it’s included in the response. If a field isn’t accessible to the context user, it isn’t included in the response, but it doesn’t cause an error. Specify names in the format ObjectApiName.FieldName. You can get any field that has a named relationship to this record. There’s no limit to the number of fields you can specify.
Optional 41.0 recordTypeId Id The ID of the record type (RecordType object) for the new record. If not provided, the default record type is used. Optional 41.0 - Response Body
- Record Defaults