Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Compare 2 records and get the field change on onmodify trigger of table

(0) ShareShare
ReportReport
Posted on by 82

Hello Experts,

We need to create a aduit trail like custom functionality for vendor i.e if anyone changes the vendor record the log should be created for that.

We have requirement to get the field name which has been modified .

How can we achieve that?

any help would be appreciated.

Regards,

Patel Riya 

  • riya patel Profile Picture
    82 on at
    RE: Compare 2 records and get the field change on onmodify trigger of table

    Thanks for the reply,

    Yes i need to do that from code but can't find the way i have used recordref but i do not know how we can make recordref to refer to the xrec values. can you help with that?

    here is the code

    pastedimage1647414963177v1.png

    Regards,

    Patel Riya

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: Compare 2 records and get the field change on onmodify trigger of table

    You can chose to log all fields on the table instead of logging only selected fields.

    Ofcouse you can do both logging and config of the changelog from code.

    But i do not have any codesamples for that. I have always done it through the user interface.

  • riya patel Profile Picture
    82 on at
    RE: Compare 2 records and get the field change on onmodify trigger of table

    Thanks for the reply

    Yes,

    But i think in that we need to add all the fields one by one foer which we need to log the change .

    pastedimage1647341674540v1.png

    So can i do this with al code ?

    Regards,

    Patel Riya

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: Compare 2 records and get the field change on onmodify trigger of table

    Have you looked at the standard change log functionality ?

    docs.microsoft.com/.../across-log-changes

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans