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

Community site session details

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

Refreshing the page on Table Extension

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Suggested answer
    Bilal Haider Profile Picture
    408 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

  • Suggested answer
    Nitin Verma Profile Picture
    21,684 Moderator 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.

  • jmtugade Profile Picture
    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
    21,684 Moderator 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.

  • Suggested answer
    Govinda Kumar Profile Picture
    2,300 Moderator 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.

  • jmtugade Profile Picture
    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?

  • jmtugade Profile Picture
    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.

  • Suggested answer
    Bilal Haider Profile Picture
    408 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.

  • Suggested answer
    Govinda Kumar Profile Picture
    2,300 Moderator 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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,285

#2
Sumit Singh Profile Picture

Sumit Singh 2,725

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,526

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans