Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to write a common code to all OnOpen trigger of pages in NAV 2015?

Posted on by Microsoft Employee

I want to write a common code in OnOpen trigger of all pages in NAV 2015. As the number of pages are too many, I am looking for a single place to write this code which will work for all pages ( like some functions in codeunit 1). Is is it possible? If yes, then please suggest how.

Thanks.

*This post is locked for comments

  • Suggested answer
    jcastro Profile Picture
    jcastro 2,245 on at
    RE: How to write a common code to all OnOpen trigger of pages in NAV 2015?

    Like the rest of the experts here have mentioned, there is not a standard way of accomplishing this.

    If you could guide us through your need maybe we can suggest an alternative though :-)

  • Suggested answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: How to write a common code to all OnOpen trigger of pages in NAV 2015?

    I don't there is a straight way of doing this, What you can do is have a codeunit and in that inside a function you can write your code, then in each page OnOpen trigger you can call this function. That is the only way forward.

    However can you briefly explain what you planning to accomplish with this, so that we can provide you few more options.

  • Suggested answer
    Miguel Llorca Profile Picture
    Miguel Llorca User Group Leader on at
    RE: How to write a common code to all OnOpen trigger of pages in NAV 2015?

    I'm sorry, but I'm pretty sure it can not be done :-)

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: How to write a common code to all OnOpen trigger of pages in NAV 2015?

    Interesting but i don't think that is possible. Just curious what type of code you are referring and what action it does.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans