The following error appears, I cannot determine the source of the problem. Help appreciated.
Here is the reported error:
Often when you see that, it means that something like this happened:
1. You created a record and got the ID.
2. An exception occurred, which rolled back the transaction that created the record.
3. You ignored the exception, then tried to do something (in this case, an UPDATE, but usually it is a GET) on the record with the ID that you got in step 1, but the record doesn't exist because the exception rolled it back.
J.Ja
Are you doing an UpdateRecord or a CreateOrUpdateRecord? If you're trying to update and it doesn't exist, erros will occur.
Both were true in partly. Actually I found Local Storage Id's and the server database ID's not being in sync.
CreateOrUpdate (creating new entry) using the same 'local source' to both resulted in CreateOrUpdate... returning a different ID then CreateOrUpdateLocal.... This was first time I noticed this. I guess after some creations and deletions this was bound to happen at some point.
I now use the result from CreateOrUpdate... to modify the source (or mapping) before calling CreateOrUpdateLocal....
Thanks for the suggestions - at least they started me looking in the right place.