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 :
Microsoft Dynamics NAV (Archived)

Trigger Events and Global Var Access

(0) ShareShare
ReportReport
Posted on by

Hi,

Does anyone have a suggestion for best practice och getting access to global variables when subscribing to a Trigger Event. 

For example in table 36 Sales Header there is a Global variable HideValidationDialog. If I'm subscribing to any Trigger Event like OnAfterValidate I would like to get the value of HideValidationDialog. Trigger Events doesn't provide Global Var Access.

One way would be to create a new function on Table 36 GetHideValidationDialog returning the value of HideValidationDialog but this would be of limited use since I might wan't to get other Variable values as well. And by adding a function like GetGlobalVariables returning most commonly used Global variables, it wouldn't be very extendable if I later would like to add a new variable all functions using my new function would fail due to wrong no. of parameters.

I thought of adding a function and a new publisher event where my function raised an Integration Event with Global Var access. But I can't subscribe to that event within my subscriber function.

Any Ideas. I can solve my most immediate problems but I need the best way with the least modification and the most reuse ability.

Br. Pontus 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,993 Super User 2025 Season 2 on at

    trigger events cannot access the global variables,AFAIK

  • Community Member Profile Picture
    on at

    Yes, that's the problem. Therefore i need a workaround.

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans