Hi guys,
i have a very annoying problem with synchronizing data to a another company. I just upgraded a database from 2009R2 to 2013R2 which includes several updates between various companys.
All of them seemed to fail, so I wrote some very basic code to check the functionality:
item.GET('466634');
item2.CHANGECOMPANY('Test');
item2 := item;
IF NOT item2.INSERT THEN
item2.MODIFY;
Guess what? If fails. ](*,)
It returns this error:
Microsoft Dynamics NAV
---------------------------
Another user has modified the record for this Item after you retrieved it from the database.
Enter your changes again in the updated window, or start the interrupted activity again.
Identification fields and values:
No.='466634'
---------------------------
OK
---------------------------
I checked it in the customer environment: ERROR
I checked it in Cronus: ERROR
I tried 2013 without R2 in Crons: ERROR
In 2009R2 it works like a charm..
My 2013R2 system is built 7.10.35800.
I'm really clueless..
Best regards
Christoph
Comments
Same error as above.
Same error as above.
Same error as above.
Works! #-o
Works! #-o
All fields, but the PK.. works :-k
All fields, including the PK, but copied manually.. works as well. [-(
So I have to update all primary key fields by hand for every synchronization process..
Item2 := Item; and Item2.TRANSFERFIELDS(Item); also copies the timestamp. The MODIFY fails because the timestamp of Item2 doesn’t match the timestamp of the existing record in company Test.
Transferfields with FALSE doesn’t copy the timestamp so it will not fail.
I can’t see other solution than the one you already found.
/Juha