Do we have a way to refresh the page on OnAfterValidate() trigger of table extension? I want to refresh the page of Purchase Order when the lines gets updated.
TIA,
JM
Do we have a way to refresh the page on OnAfterValidate() trigger of table extension? I want to refresh the page of Purchase Order when the lines gets updated.
TIA,
JM
Hi jmtugade,
You can call the procedures of your page after declaring that page variable on your table extension code var
PageBuffer: Page NameOfYourPage;
begin
PageBuffer.yourprocedure();
end;
try updating your page as well on the trigger where you want to update.
Regards
You are right you cannot call page procedure from table trigger event. This is what I said above.
ill give it a try, but how can you call the procedure on Page using the trigger on table Extension? Sorry im just new on AL Code.
I want to update the header page after validaton on Line page. is that possible?
Hi jmtugade,
If you want to update the PO page 50, you cannot do it from the header table extension. Instead, you can update it after the validation of the field for which you want to update the page, like this, CurrPage.Update();
If you want to update the line page after some validation on the header page, you can do it like this, CurrPage.PurchLines.Page.Update();
Regards.
Sorry I did not get this line.
I have done it but I Inserted the value on Purhcase Header table which leads to some errors. I want it to be a calculated field instead of inserting it to the table. that's why I want it to refresh so I can put the calculation on OnPageLoad.
My Scenario is, when Qty. field in Purchase Line is updated, then it will trigger the OnAfterValidate() which has some calculations then the output needs to be display on Purchase Header field. I have done it but I Inserted the value on Purhcase Header table which leads to some errors. I want it to be a calculated field instead of inserting it to the table. that's why I want it to refresh so I can put the calculation on OnPageLoad.
Did you try with Currpage.refresh() on Page's Validate trigger? If it does not work, you can give a try to create a function on Page like below and call this function from field's Onvalidate trigger in Table.
procedure PageUpdatefromTable()
begin
currpage.refresh();
end;
Thanks.
Hi,
As per my knowledge it is not possible from table trigger event to refresh page.
But if this table event is triggered by some input from page then you can use that page event to refresh the page using CurrPage.Update
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,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156