mibuso.com

Microsoft Business Solutions online community
It is currently Fri May 24, 2013 2:14 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: RecordRef.MODIFY is not Update
PostPosted: Thu Aug 09, 2012 5:35 am 
Offline

Joined: Thu Feb 12, 2009 9:22 am
Posts: 251
Country: Singapore (sg)
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:

Code: Select all
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


Top
 Profile E-mail  
 
 Post subject: Re: RecordRef.MODIFY is not Update
PostPosted: Thu Aug 09, 2012 8:29 am 
Offline

Joined: Sat Oct 08, 2005 11:22 am
Posts: 499
Location: TURKEY
Country: Turkey (tr)
You have problems with your parameters (Check the record variables in debug mode). I recommend using following code:

Code: Select all
recref.GETTABLE(Rec);
fldref := recref.FIELD(57000);
fldref.VALIDATE(1);
recref.MODIFY;
recref.SETTABLE(Rec);

_________________
Ufuk Asci
Pargesoft


Top
 Profile  
 
 Post subject: Re: RecordRef.MODIFY is not Update
PostPosted: Thu Aug 09, 2012 1:22 pm 
Offline

Joined: Thu Feb 12, 2009 9:22 am
Posts: 251
Country: Singapore (sg)
Hi ufuk,

Thanks i got it.

Regards,
Yukon

_________________
Make Simple & Easy


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: