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
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.
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.
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?
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
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.
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
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?
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156