You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mobilesync/README.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -520,6 +520,59 @@ Max batch size: 1 (one parent + children per request). Uses `@{refId.id}` substi
520
520
521
521
`isNewerThanServer:` checks parent and all children timestamps in a single SOQL.
522
522
523
+
#### Fieldlist Configuration
524
+
525
+
Both the parent and children fieldlists passed to `SFParentChildrenSyncUpTarget` must contain only **user-writable fields**. Salesforce will reject the Composite API request with `INVALID_FIELD_FOR_INSERT_UPDATE` if any of the following system/audit fields are included:
526
+
527
+
-`Id`
528
+
-`CreatedDate`
529
+
-`LastModifiedDate`
530
+
-`SystemModstamp`
531
+
-`IsDeleted`
532
+
533
+
**The child's `parentIdFieldName` must not appear in `childrenCreateFieldlist`.** When a child record is being created alongside a new parent, the SDK injects the parent reference automatically using `@{refId.id}` substitution in the Composite API request body. This tells Salesforce to resolve the child's lookup field to the server-assigned ID of the just-created parent record. If you also include that field name explicitly in `childrenCreateFieldlist`, the request will contain a conflicting explicit value alongside the reference substitution, and Salesforce will return `INVALID_FIELD_FOR_INSERT_UPDATE`.
534
+
535
+
The `parentIdFieldName`**may** appear in `childrenUpdateFieldlist` when updating existing child records (where no reference substitution is used), provided the field is user-writable in that context.
0 commit comments