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.
Update Records Using sObject Relationships
If the fields parameter is used with fields that don’t exist or aren’t visible to the consumer by field-level security, a 400 error response is returned. For other error messages, see Status Codes and Error Responses.
Syntax
URI: /services/data/vXX.X/sobjects/sObject/id/relationshipFieldName
Formats: JSON, XML
HTTP Method: PATCH
Authentication: Authorization: Bearer token
Parameters
| Parameter | Description |
|---|---|
| sObject | The name of the object. For example, Contact. |
| id | The identifier of the record. For example, 003R0000005hDFYIA2, the contact ID. |
| relationshipFieldName | The name of the field that contains the relationship. For example, Account. Account is the name of the relationship on the child Contact object. |
Example
For an example of updating a record using PATCH, see
Update a Record.