Another user has modified the record / Navision SQL Option

skalle77skalle77 Member Posts: 6
I'm using a function to copy a Contact in Table 5050 Contact:

CopyContact

clear(newContact);
newContact.insert(true); //Creates the new Contact with the next number
ContactNo := newContact."no.";
newContact.transferfields(rec);
newContact."no." := ContactNo;
newContact.Modify;

Everything works fine on Microsoft Dynamics NAV but I get the error "Another user has modified the record...." on Navision SQL Option. I already tried to lock the table and I also tried to get the new Record before modifying it. Can anybody give me a hint?

Comments

  • KarenhKarenh Member Posts: 209
    Try insert(true) at then end instead of insert/modify. Before inserting, make contact no. blank (:= "");
  • kinekine Member Posts: 12,562
    You do not need the TRANSFERFIELDS function there - you are assigning between same record variables. Just try to use newContact := Rec;
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.