FactBox based on temporary table

daborgdaborg Member Posts: 54
edited 2012-11-21 in NAV Three Tier
I have a factbox that is based on a temporary table. In Classic this form can be launched from either a sales or a purchase doucment. The temporary table is based on either the sales or purchase lines on the document.

There is a 'setsource' function in the factbox that accepts a recordref and then calculates and populates the temporary table based on that recordref. I don't know how to utilize that function in the RTC environment. I cannot add the factbox to the sales/purchase subforms but how do I add it to the sales/purchase header pages and get the factbox to update when the user selects different lines on the document. ](*,)

Any help is appreciated.

Comments

  • fitolfitol Member Posts: 46
    daborg wrote:
    I cannot add the factbox to the sales/purchase subforms but how do I add it to the sales/purchase header pages and get the factbox to update when the user selects different lines on the document.

    You add the factbox to the main page, and in the properties you set correct SubFormLink (obviously) and set ProviderID = ID for the subpage area.
  • daborgdaborg Member Posts: 54
    fitol wrote:
    You add the factbox to the main page, and in the properties you set correct SubFormLink (obviously) and set ProviderID = ID for the subpage area.

    Thanks! I get that part fine, but how do I have the 'SetSource' function in teh factbox page execute when the record changes on the subform?
  • fitolfitol Member Posts: 46
    daborg wrote:
    how do I have the 'SetSource' function in teh factbox page execute when the record changes on the subform?

    The only way would be to call the function from the factbox's OnAfterGetRecord or OnAfterGetCurrRecord trigger.
    I don't think there is anywhere else you can call the function from.
  • BeliasBelias Member Posts: 2,998
    hi daborg, i've already answered your post
    http://www.mibuso.com/forum/viewtopic.php?f=5&t=20084&hilit=singleinstance&start=15
    second page
    what didn't you get?did you try to copy and understand the sample objects i posted in that topic? i thought they were really simple :-k
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • WaldoWaldo Member Posts: 3,412
    Be aware that in NAV2013, OnAfterGetCurrRecord is back :D

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
Sign In or Register to comment.