Skip to main content
Business Central forum
Suggested answer

Find Which field causes record modification

editSubscribe (1) ShareShare
ReportReport
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 59,978 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 2,716 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,984 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

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,066 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,585 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans