Closed andreilungu closed 6 years ago
Hello,
I tested with the event added in the new build, but now I think that this solves the issue only partially:
We need the "TempVATAmountLine2" in the page extension because we use it later on to populate a custom added subform.
Please see how it was in 2017 version:
How do you recommend to implement this (preferably without Single Instance Codeunit) ?
Event Subscribers cannot be created in a page:
The same issue happens also for page 401 Purch. Credit Memo Statistics. The scenario is the same with global variable "TempVATAmountLine".
Version 13.0.22070.0
PAGE 161 "Purchase Statistics"
I am trying to convert custom modification made to this page to a Page Extension.
At the end trigger OnAfterGetRecord we have added a function that does some calculations and copies some values based on the values from global variable "TempVATAmountLine"
The issue is that in the Page Extension we don't have access to this global temporary variable.
We have this situation multiple times, not only at this example and sometimes we filled another temporary in the page extension but it is bad practice (duplicating code, executing similar code multiple times), so we want to ask you if there is a better workaround for this ?
Our idea is if you can add an Event publisher in page 161 at the end of OnAfterGetRecord trigger that will contain a by reference parameter of the global variable "TempVATAmountLine". In this way if we subscribe to that event we could have access from the page extension to that global variable that contains values calculated in the page.
Thanks, Andrei Lungu