Able to tell if Record has been Modified without...

XypherXypher Member Posts: 297
edited 2008-04-07 in NAV Tips & Tricks
Is there any flag that gets turned on somewhere that tells you a record has been modified without having to go through each field checking the Field vs xRec.Field ?

Answers

  • tinoruijstinoruijs Member Posts: 1,226
    Xypher wrote:
    Is there any flag that gets turned on somewhere that tells you a record has been modified without having to go through each field checking the Field vs xRec.Field ?

    If you modify a record, the OnModify-trigger on the record is being called.
    Except when a change through code is being made without using MODIFY(TRUE);
    If you want to keep track on changes on certain field, then you could use change log entries.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • ara3nara3n Member Posts: 9,256
    Format should do it.
    item.get('CNKOR000003');
    
    item2.get('CNKOR000003');
    
    if format(Item2) = format(Item) then
      message('they are the same')
    else
      message('they are different');
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • girish.joshigirish.joshi Member Posts: 407
    Rashed strikes again! Great tip!
  • XypherXypher Member Posts: 297
    Appears that may do the trick.

    Thanks Rashed
  • tinoruijstinoruijs Member Posts: 1,226
    ara3n wrote:
    Format should do it.
    item.get('CNKOR000003');
    
    item2.get('CNKOR000003');
    
    if format(Item2) = format(Item) then
      message('they are the same')
    else
      message('they are different');
    

    Good tip! =D>
    I saw this once used for importing a file. Can be very handy.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • ara3nara3n Member Posts: 9,256
    Thanks.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from Navision forum to Navision Tips & Tricks forum]

    Now, if you guys could just help me pointing out these topics to be moved to Tips&Tricks by using the reporting function, I would be very grateful.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.