web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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 

I have the same question (0)
  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    Have you looked at the standard change log functionality ?

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

  • riya patel Profile Picture
    82 on at

    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
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    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

    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

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,344 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,742 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,231

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans