Skip to main content

Notifications

Small and medium business | Business Central, N...
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 73,472 Super User 2024 Season 2 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 12,167 Most Valuable Professional 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 21,091 Super User 2024 Season 1 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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans