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.

  • Teddy Herryanto (That NAV Guy) Profile Picture
    13,637 Moderator on at
    RE: Generic onModifyRecord for all tables

    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.

  • altjim Profile Picture
    5 on at
    RE: Generic onModifyRecord for all tables

    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.

  • ManishS Profile Picture
    80 on at
    RE: Generic onModifyRecord for all tables

    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
    RE: Generic onModifyRecord for all tables

    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.

  • Teddy Herryanto (That NAV Guy) Profile Picture
    13,637 Moderator on at
    RE: Generic onModifyRecord for all tables

    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
    RE: Generic onModifyRecord for all tables

    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.

  • ManishS Profile Picture
    80 on at
    RE: Generic onModifyRecord for all tables

    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

  • mrnaouel Profile Picture
    15 on at
    RE: Generic onModifyRecord for all tables

    hi

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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 536 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 400

#3
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 384

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans