Problem on SQL option navision

iqbalmadiqbalmad Member Posts: 179
hi

i just moved my database on MS SQL 2005

on one particular custom made program, i am getting this problem

"Another user has modified the record for this Payroll MasterFile 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.='139513'"

the program breaks on a MODIFY command.


Can anyone help please.

thankx

Comments

  • ara3nara3n Member Posts: 9,256
    You need to do a get in your code for the variable before the modify.

    Somewhere in your code you are calling a function that goes and modifies the record (if you find it, then make sure you pass by reference the current variable).
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Dmytro_Sitnik_[MSFT]Dmytro_Sitnik_[MSFT] Member, Microsoft Employee Posts: 4
    iqbalmad wrote:
    hi

    i just moved my database on MS SQL 2005

    on one particular custom made program, i am getting this problem

    "Another user has modified the record for this Payroll MasterFile 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.='139513'"

    the program breaks on a MODIFY command.


    Can anyone help please.

    thankx


    The reason why you can get this error is that timestamp of the current record is less than timestamp of the record on the server.

    Sample code:

    OBJECT Codeunit 70000 cu
    {
    OBJECT-PROPERTIES
    {
    Date=23-05-08;
    Time=13:33:17;
    Modified=Yes;
    Version List=;
    }
    PROPERTIES
    {
    OnRun=BEGIN
    rec.FIND('-');
    rec2 := rec;

    rec.MODIFY;

    rec := rec2;
    rec.MODIFY;
    END;

    }
    CODE
    {
    VAR
    rec@1102601000 : Record 70000;
    rec2@1102601001 : Record 70000;
    BEGIN
    END.
    }
    }
    SOFTWARE DEVELOPMENT ENGINEER

    NAV Sustained Eng

    “This posting is provided "AS IS" with no warranties, and confers no rights.”
Sign In or Register to comment.