Newer Version Available
Records, Get, Delete, Patch
- Resource
-
1/ui-api/records/{recordId} - Available version
- 39.0
- HTTP methods
- GET, DELETE, PATCH
- Request parameters for GET
-
Parameter Name Type Description Required or Optional Available Version fields String[] Specifies the fields to return. If this property is specified, the response is a union of fields and optionalFields. If the context user doesn’t have access to a field, an error is returned.
If you’re not sure whether the context user has access to a field and you don’t want the request to fail if they don’t, use the optionalFields parameter instead.
Either fields or layoutTypes is required. 39.0 layoutTypes String[] Specifies the fields to return. If this property is specified, the response is a union of layoutTypes, modes, and optionalFields. A collection containing any of these values:- Compact—Use this value to get a layout that contains a record's key fields.
- Full—(Default) Use this value to get a full layout.
Either fields or layoutTypes is required. 39.0 modes String[] The access mode for the record. This value determines which fields to get from a layout. Layouts have different fields for create, edit, and view modes. For example, formula fields are rendered in view mode, but not in create mode because they’re calculated at run time, like formulas in a spreadsheet. A collection containing any of these values: - Create—Use this mode if you intend to build UI that lets a user create a record. This mode is used by the /ui-api/record-defaults/create/{apiName} resource.
- Edit—Use this mode if you intend to build UI that lets a user edit a record. This mode is used by the /ui-api/record-defaults/clone/{recordId} resource.
- View—(Default) Use this mode if you intend to build UI that displays a record.
Optional if the layoutTypes parameter is specified. Otherwise, this parameter is ignored. 39.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 optional field names using the format: {ObjectApiName}.{FieldName} Optional 39.0 - Response body for GET
- Record
- Request body for PATCH
-
Name Type Description Required or Optional Available Version apiName String To create a record, specify the API name of an Object from which to create the record. To update a record, use null. Required 39.0 fields Map<String, Object> Map of field names to field values. Format data types according to these rules:
- Address—JSON String
- Base64—JSON String
- Boolean—JSON Boolean, true or false
- Currency—JSON Float
- Date—JSON string in correct format
- DateTime—JSON string in ISO 8601 format
- Double—JSON Float
- Email—JSON String
- EncryptedString—JSON String
- Int—JSON Number
- Location—JSON String
- MultiPicklist—JSON String
- Percent—JSON Float
- Phone—JSON String
- Picklist—JSON String
- Reference—JSON String.
- String—JSON String
- TextArea—JSON String
- Time—JSON String in format HH:MM:SS
- Url—JSON String
Required 39.0 - Response body for PATCH
- Record
- Example for PATCH
-
1PATCH /ui-api/records/001R0000003Gjrt -
1{ 2 "apiName": "Account", 3 "fields": { 4 "Name": "Universal Containers" 5 } 6} - To provide an address, provide the individual fields as
separate inputs. The compound field is only available in the
response.
1{ 2 "apiName": "Account", 3 "fields" : { 4 "Name": "Local Boxes", 5 "BillingState": "WA", 6 "BillingStreet" : "123 Main Street", 7 "BillingCountry" : "USA" 8 } 9}