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
    Teddy Herryanto (Th... 13,025 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
    altjim 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
    ManishS 78 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
    altjim 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
    Teddy Herryanto (Th... 13,025 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
    altjim 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
    ManishS 78 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
    mrnaouel 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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans