-
Notifications
You must be signed in to change notification settings - Fork 429
Open
Labels
Description
Please fill out the following details:
- Version of Mobile SDK Used:
8.2.0 - Issue found in Native App or Hybrid App:
React-Native - OS Version:
10.15.5 (19F101) - Device: Simulator (iPad)
- Steps to reproduce:
Currently have the following Parent/Children Sync Up in place:
{
iOSImpl: "SFParentChildrenSyncUpTarget",
createFieldlist: ["Id", "Name"],
updateFieldlist: ["Id", "Name"],
childrenCreateFieldlist: ["Id", "FirstName", "LastName", "AccountId"],
childrenUpdateFieldlist: ["Id", "FirstName", "LastName", "AccountId"],
parent: {
idFieldName: "Id",
sobjectType: "Account",
modificationDateFieldName: "LastModifiedDate",
soupName: "AccountTest",
},
relationshipType: "MASTER_DETAIL",
type: "rest",
modificationDateFieldName: "LastModifiedDate",
children: {
parentIdFieldName: "AccountId",
idFieldName: "Id",
sobjectType: "Contact",
modificationDateFieldName: "LastModifiedDate",
soupName: "ContactTest",
sobjectTypePlural: "Contacts",
},
idFieldName: "Id",
}
- Insert locally a valid
Accountwith Id =local_1- Insert locally an invalid
Contactwith AccountId =local_1, but without aLastName- Run SyncUp
- Actual behavior:
Account is created, but Contact isn't. This is okay, except that the Contact does not have its AccountId replace, which makes it impossible to reconciliate afterward to the parent Account.
Accounts:
[
{
"__local__": false,
"_soupEntryId": 13,
"__locally_deleted__": false,
"Id": "0012R00002B3pkyQAB",
"__locally_updated__": false,
"__locally_created__": false,
"_soupLastModifiedDate": 1601305456881,
"Name": "Sample Account",
"attributes": {
"type": "Account"
}
}
]Contacts:
[
{
"__last_error__": "[\n {\n \"message\" : \"Required fields are missing: [LastName]\",\n \"fields\" : [\n \"LastName\"\n ],\n \"errorCode\" : \"REQUIRED_FIELD_MISSING\"\n }\n]",
"__local__": true,
"_soupEntryId": 9,
"__locally_updated__": true,
"__locally_deleted__": false,
"AccountId": "local_1",
"LastName": "Jack",
"Id": "local_dummy_id",
"_soupLastModifiedDate": 1601305589200,
"attributes": {
"type": "Contact"
},
"__locally_created__": true
}
]- Expected Behavior:
Contact should either have AccountId replaced from local_1 to 0012R00002B3pkyQAB after syncUp OR Account should not be created, leaving its ID value to local_1.
Accounts:
[
{
"__local__": false,
"_soupEntryId": 13,
"__locally_deleted__": false,
"Id": "0012R00002B3pkyQAB",
"__locally_updated__": false,
"__locally_created__": false,
"_soupLastModifiedDate": 1601305456881,
"Name": "Sample Account",
"attributes": {
"type": "Account"
}
}
]Contacts:
[
{
"__last_error__": "[\n {\n \"message\" : \"Required fields are missing: [LastName]\",\n \"fields\" : [\n \"LastName\"\n ],\n \"errorCode\" : \"REQUIRED_FIELD_MISSING\"\n }\n]",
"__local__": true,
"_soupEntryId": 9,
"__locally_updated__": true,
"__locally_deleted__": false,
"AccountId": "0012R00002B3pkyQAB",
"LastName": "Jack",
"Id": "local_dummy_id",
"_soupLastModifiedDate": 1601305589200,
"attributes": {
"type": "Contact"
},
"__locally_created__": true
}
]- Error Log:
None