Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Refreshing the page on Table Extension

Posted on by 20

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

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Refreshing the page on Table Extension

    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

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 45 on at
    RE: Refreshing the page on Table Extension

    You are right you cannot call page procedure from table trigger event. This is what I said above.

  • jmtugade Profile Picture
    jmtugade 20 on at
    RE: Refreshing the page on Table Extension

    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.

  • jmtugade Profile Picture
    jmtugade 20 on at
    RE: Refreshing the page on Table Extension

    I want to update the header page after validaton on Line page. is that possible?

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Refreshing the page on Table Extension

    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.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Refreshing the page on Table Extension

    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.

  • jmtugade Profile Picture
    jmtugade 20 on at
    RE: Refreshing the page on Table Extension

    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.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Refreshing the page on Table Extension

    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.

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 45 on at
    RE: Refreshing the page on Table Extension

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans