Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate records of child object getting inserted in CRM when the parent record is deleted. #381

Open
psinghal213 opened this issue Aug 8, 2024 · 2 comments

Comments

@psinghal213
Copy link

psinghal213 commented Aug 8, 2024

SDK version used: 10.2.0

Steps to replicate:

  1. Login to custom Mobile application after setting up the connected app settings on salesforce and configuring the secrets in bootconfig.plist.
  2. After initial/first sync is complete, Navigate to Account list screen
  3. Open an Account (Account A) -> Create a new Contact on this account.
  4. Navigate back to Account list screen.
  5. Choose a different account from the list (Account B).
  6. Login to Salesforce (on browser) as an admin role and delete Account B from Salesforce CRM. (note application is offline so Account B is still present in mobile local DB)
  7. Switch back to mobile application and create a contact on Account B
  8. Start a data Sync.
  9. Data sync will receive error on Contact Syncup “Entity is deleted” (Since we deleted Account B from Salesforce CRM during the process).
  10. Open Workbench or Salesforce Lightning page and navigate to Account A, we will be able to see 2 contacts created on Account A even though we just created 1 contact from mobile on Account A. so the record is duplicated. both records contain the same values for all the fields present on contact object even the same createdDate and same local ID passed from mobile custom app.

NOTE: Account is the parent Object whereas Contact is a child object linked to account object using a specific field called "AccountId".
Contact_Mobile_SyncUp_Error
Workbench_Contact_Dupliacte

@wmathurin
Copy link
Contributor

What type of sync up target are you using to save records back to the server?

@wmathurin
Copy link
Contributor

Are you using ParentChildrenSyncUpTarget?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants