Note: 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.
Record Input
- Example
-
1POST /ui-api/records -
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} - Properties
-
Name Type Description Required or Optional Available Version allowSaveOnDuplicate Boolean Specifies whether to save a duplicate record (true), or not (false). The default value is false. Don’t specify this property when checking for duplicate records.
Optional 43.0 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 or don’t pass this property. To check for duplicate records, specify the API name of the object for which you’re performing the duplicate check. Required to create a record. Required to check for duplicate records.
41.0 fields Map<String, Object> Map of field names to field values. Format data types according to these rules:
- Address—JSON String. Addresses are compound fields and must be broken up into their constituent fields. See the previous example.
- Boolean—JSON Boolean, true or false
- Currency—JSON Number (for example, 67.54)
- Date—JSON string (for example, 2020-04-20)
- DateTime—JSON string in ISO 8601 format (for example, 2012-02-18T06:40:41.000Z)
- Double—JSON Number
- Email—JSON String (for example, joe@smith.com)
- EncryptedString—JSON String
- Int—JSON Number
- Location—JSON String. Location fields are compound fields and must be broken up into their constituent fields.
- MultiPicklist—JSON String (for example, Dog;Cat;Fish).
- Percent—JSON Number
- 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
To specify the main record type, either don’t specify the RecordTypeId field, or set it to null.
Required 41.0