RecordRef.MODIFY is not Update

yukonyukon Member Posts: 361
Dear Team,


I'm update one field using with RecordRef.Modify function. Value is changed when i look at debug but it not actually update the rec. What wrong my code. :roll:
T18.
OnModify=BEGIN
               //Remove some code for testing
               fn1;//Here
             END;

    PROCEDURE fn1@1000000001();
    VAR
      recRef@1000000000 : RecordRef;
    BEGIN
      recRef.GETTABLE(Rec);
      fn2(recRef);
    END;

    PROCEDURE fn2@1000000000(precRef@1000000000 : RecordRef);
    VAR
      recRef@1000000001 : RecordRef;
      fldRef@1000000002 : FieldRef;
    BEGIN
      recRef   := precRef;
      fldRef   := recRef.FIELD(57000);
      fldRef.VALIDATE(1);
      recRef.MODIFY;
    END;

    BEGIN
    END.

Regards,
Yukon
Make Simple & Easy

Comments

  • ufukufuk Member Posts: 514
    You have problems with your parameters (Check the record variables in debug mode). I recommend using following code:
    recref.GETTABLE(Rec);
    fldref := recref.FIELD(57000);
    fldref.VALIDATE(1);
    recref.MODIFY;
    recref.SETTABLE(Rec);
    
    Ufuk Asci
    Pargesoft
  • yukonyukon Member Posts: 361
    Hi ufuk,

    Thanks i got it.

    Regards,
    Yukon
    Make Simple & Easy
Sign In or Register to comment.