Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Find Which field causes record modification

Posted on by 40
Hi There,
 
For a validation, we are modifiying a status boolean field everytime job card opens. It causes Last Modified Date to be current date always. So I need to track if any other field other than the status field is causing record modification, last modified date can be changed automatically. If status field alone is updating , no need to change the last modified date. How to do that in AL ? 
 
Thanks for any guidance!
Categories:
  • Dej Profile Picture
    Dej 40 on at
    Find Which field causes record modification
    Thanks!.
     
    please assist about How to enable change log function of the status field?
     
    also, I need to revert the last modified date to xrec modified date . The objective is System's Last Modified Date should not update if I change Status field.
     
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 64,622 Super User on at
    Find Which field causes record modification
    Hi, if you just want to monitor fields, it is recommended to use the standard feature, Field Monitoring.
     
    If it is just a certain field (Status), you can enable the Change Log function of this field, and after modification, search in the code to see if there are records. If so, it means it has been modified.
     
    Hope this helps.
    Thanks.
    ZHU
  • Dej Profile Picture
    Dej 40 on at
    Find Which field causes record modification
    Thank you , I thought about that. But I have more than 50 fields in job table (including custom fields). Instead of comparing all those fields, is there any way to find, only status field has been modified ?
  • gdrenteria Profile Picture
    gdrenteria 5,353 Super User on at
    Find Which field causes record modification
    Hi
    Complementing what was well mentioned by Nitin Verma, I give you some links, I hope they can give you some light.
    Best regards
    Gerardo
  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 20,991 Super User on at
    Find Which field causes record modification
    Hi,
    You can use Event OnBeforeMody with Rec and XRec. fileld value to compare what is going to be changed.
     
    Thanks

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,768 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,985 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans