sfpx Posted July 7, 2014 Posted July 7, 2014 Did not know how to phrase it so sorry for the title How to manage this example situation : 1.User A and B are both offline 2.They both create the same Client 3.They both invoice the same new created Client. How to merge all this on the sync ? I tried to change the primary key to insert the name at the creation instead of an UUID but when I sync there is a duplicate entry error. Thanks
Jesse Barnum Posted July 7, 2014 Posted July 7, 2014 That's a good question. First thing: Don't change the primary key of any existing records! That is why you're getting the duplicate. Instead, your de-duplication script should change the foreign keys for the invoices so that they point to the client record that you want to keep, and then delete the other client record that you want to get rid of. This is the same process that you would use if you were not using MirrorSync.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now