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...
Unanswered

Generic onModifyRecord for all tables

(0) ShareShare
ReportReport
Posted on by 5

My company needs me to add some code every time the user tries to modify any of the fields in all the pages (for example in the customer card and in the item card). I want to know if there is a generic event to which i could subscribe to(like onModifyRecord ) that gets called before the modification of ANY OF THE FIELDS OF ALL THE PAGES in the whole NAV.

What i mean, is that i don't want to write code in every onModify function of a page. Instead, a more generic function is what we need.

I have the same question (0)
  • mrnaouel Profile Picture
    15 on at

    hi

    you can modify in the user profile where do you make the fields uneditable

  • ManishS Profile Picture
    86 on at

    If your company is looking for Audit trial, then you can activate change log on the required tables and fields.

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

    www.archerpoint.com/.../change-logs-and-microsoft-dynamics-nav-2016

  • altjim Profile Picture
    5 on at

    What we desire to do, is to ask for authentication (user/password) every time a user tries to update a record from a page. We are aware of NAV's log.

  • Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    are you trying to authenticate them for every single record modification ? that sounds like a great idea to annoy every user.

  • altjim Profile Picture
    5 on at

    It would be nice if you provided a technical solution instead of your opinion. The policies of the company are strict for a specific reason (so people won't die by accident if an unauthorized user changes a BOM or another entity for example). So yes, i am glad to annoy everyone. Thank god some users are actually trying to help.

  • ManishS Profile Picture
    86 on at

    What next if the user authenticates themself and modify the record.

    What control do you have on users that they don't share their userid and password.

    Rather that asking the user to authenticate them self, why not capture their userid, date and time when the record was created or modified.

  • altjim Profile Picture
    5 on at

    Why are you asked for authentication when you try to modify settings in your Google account? By your thinking, Google should just log the day and time that you changed the settings and it would be ok.

    As i mentioned previously, we are already using logs. A new level of security is required though. Please i asked a specific question. It would be better to provide a solution to the question rather than the business logic. Thank you though.

  • Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    because that is an approval, not user authentication. user authentication will not prevent malicious user from changing your BOM. if they have access to your login ID and password, having another authentication will not prevent them from doing malicious thing. approval is there to make sure that at least two people agree to the change. Be open to other solutions. Your company is not the only company that is really strict. Every company is unique, but not that unique that you can't learn from other company at all.

    if you want to achieve your solution, there is OnGlobalModify in Codeunit 1.

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,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans