web
You’re offline. This is a read only version of the page.
close
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 

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 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
    Inge M. Bruvik Profile Picture
    1,111 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,092

#2
YUN ZHU Profile Picture

YUN ZHU 663 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 515

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans