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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to refresh a factbox that has a temporary table as source table?

(6) ShareShare
ReportReport
Posted on by 18
Hello everyone,
 
As the title suggests, I have a fact box that is based on a temporary table. The fact box should be attached to both the “Item List” and the “Item Card.”
 
On the “Item List,” I want the fact box/temporary table to be refreshed/updated every time I select a different item. This should trigger a function that refills the temporary table.
 
I just can't figure out if or how it's possible to do that.
I have the same question (2)
  • Verified answer
    Dhiren Nagar Profile Picture
    2,898 Super User 2026 Season 1 on at
    Hi,
     
    For this you need to follow few steps.
     
    1- Create the factbox page.
    2- Create a procedure in the Factbox page which will refill the data as per the logic and based on the input of Rec or Item Code primary key as an input.
    3- Attach the factbox page to the extension of Item list and Card page. (Use UpdatePropagation and other properties based on the output you need.
    4- In Item List page and Card page use OnAfterGetCurrRecord trigger to call the factbox procedure and give the Item code as input to the procedure. (You can call it like - CurrPage.FactboxPagePartName.PAGE.Procedurename(Input variables);
     
    Regards,
    Dhiren.
     
     
    Mark this as the verified answer if helpful.
     
     
  • Verified answer
    Sumit Singh Profile Picture
    11,757 Super User 2026 Season 1 on at
    Hi, 
     
    I am not purely technical however found below official links which might help you:- 
     
    1. Build your FactBox as a CardPart/ListPart with SourceTableTemporary = true. It holds the temp rows you render.
    2. Expose a public procedure on the FactBox page (e.g., SetItem(ItemNo: Code[20])) that clears & refills the temporary table. (Then call CurrPage.Update(false) to redraw if needed.)
    3. On Item List and Item Card, in OnAfterGetCurrRecord(), call the method on the part:
    4. trigger OnAfterGetCurrRecord()
    5. begin
    6.     CurrPage.MyFactBoxPart.PAGE.SetItem(Rec."No.");
    7. end;
    OnAfterGetCurrRecord fires when the current row changes in a list, which is ideal for refreshing the FactBox.
    Official docs: Note: This answer is based on my understanding, with Microsoft Copilot helping me organize and polish the wording.
    Mark the Boolean true “Does this answer your Question” if this is Helpful.
     
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,169 Super User 2026 Season 1 on at

    You can do it — but the key is that you have to manually refill and refresh the temporary table when the record changes.

    On your Item List and Item Card pages, use the OnAfterGetCurrRecord() (or OnAfterGetRecord() for lists) trigger to call a procedure on the FactBox page that rebuilds the temp table. After that, use CurrPage.UPDATE() (or CurrPage.UPDATE(false) if you don’t want to lose focus) to redraw the FactBox.

    So flow is:

    • Item changes → trigger fires.

    • Refill temp table → call your procedure.

    • Refresh FactBox with CurrPage.UPDATE().

     

    That way your FactBox always reflects the currently selected item.

     

    ✅ Mark this as the verified answer if helpful.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans