web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Catch Event from page which has pre-defined option or function (use for Extension)

(0) ShareShare
ReportReport
Posted on by 59

Hi All.

I can issue now - to catch Event from page which has pre-defined option or function.

E.g. we have page 5522 "Order Planning" (or another page, it is like for example).

We have pre-defined selection (like "Show Demand as") with some option for this worksheet.

E.g. I need to change line "Refresh &Planning Line" for Actions to my own, which do similar point. What I do:

1. I created new Action-line without code (because I plan to use it for Extension).

2. I created new CU and subscribed for "OnAfterActionEvent" Event for this page&action.

Issue - all good, but I need to receive value from this predefined function (it is "Show Demand as" from example), but have Rec only.

Can you hepl me some how? main point - I can't add code to newly created Action-line, because I need it for Extension.

Thank you in advance.

BR, Yuriy

*This post is locked for comments

I have the same question (0)
  • Muratvzr Profile Picture
    743 on at

    I think you have to create a new Integration Event and passvalues to it and add this event subcriber.

    Maybe this will help you

    blogs.msdn.microsoft.com/.../integration-events-in-microsoft-dynamics-nav-2016

  • RedFox Profile Picture
    59 on at

    Hi Murat Vezir.

    Thank you for answer.

    Could you advice me now how can I pass through local value from page (value from local variable) to Event (see my description and it is my question), if vent has Rec only?

  • Muratvzr Profile Picture
    743 on at

    Please give me more details about this which page and what is your local variable and where do u set this variable. I ll try to write a sample code for you

  • RedFox Profile Picture
    59 on at

    Murat, I wrote example above - page 5522 "Order Planning" and value for pre-defined selection "Show Demand as" should be transferred to CU (which should work similar to Action "CalculatePlan").

    main issue - it is for Extension and it is not allowed to touch standard code

    Thank you in advance.

  • Muratvzr Profile Picture
    743 on at

    if I understood it correctly.  

    You should create a event publisher function on a sperate CU and add which variables you need to locals.

    And raise that event on your action code which you are writing on extension like :

    Myeventcodeunit.SampleEvent(rec, varx,varb );

    And than go and subcribe this event you dont need to modify 5522 or any objects

  • RedFox Profile Picture
    59 on at

    Sorry, but I have page 5522 and I have variable on this page (you can see it under "Show Demand as"). OK?

    Question - why I need to create new event publisher function on a separate (!!!) CU if I have all information on this page only?

  • Muratvzr Profile Picture
    743 on at

    Because there is no event that handles your situation, So you create a new one for your inquiry. Am I making you angry? I just want to help you. Sorry If my solution seems inappropriate to your problem.

    Also, you don't want to change the code of  5522 this makes you have to do it on separate cu.

  • RedFox Profile Picture
    59 on at

    Murat, thank you for your help and you show direction (I see "IncludeSender") and no angry at all.

    But I wrote example where I need to receive filters, which set by user on page. Looks like Business Event is solution, but I can't write code on page for Extension.

    Thank you again.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans