RTC Page / SubPage Communication

Hi,

I have a flowfield in the parent page that should display sum from the child page. When I change values in the child page the parent doesn’t update the value.

I have to F5 update the page to get it to read current value.

Maybe something like in the child page OnAfterGetRecord event calling something like CurrPage.Parent.Refresh, but I don’t that kind of functions.

Follow this blog post

http://dynamicsuser.net/blogs/mark_brummel/archive/2009/12/16/tip-25-update-header-page-from-the-line-page.aspx

As I do not really support this SendKeys idea (it is bad practice - as well as running timer triggers which anyway do not work in RTC at all) I would try the following:

Change the subform to show the total there. This would then also work if the “General” faast tab is being collapsed.

For this purpose just put the following items BEFORE the repeater:

Group - Fixed Layout
Group - Group
Field (no source expression)
Group - Group
Field (Source expression PurchHeader.“Total Line Amount”)

In the OnAfterGetRecord trigger just do a GET on the PurchHeader variable and call the calcfields

Thanks a lot, I also prefer the cleaner solution and avoid calling this external component to solve the problem. /Tommy

Hi Tommy,

you find a blog which I wrote regarding this AFTER I have answered your post:

http://dynamicsuser.net/blogs/tomblog/archive/2011/07/01/Showing-Totals-for-Sub-Pages-in-Microsoft-Dynamics-NAV-2009.aspx

This would explain a bit more detailed.

Hello Thomas

I have used the example you defined in your Blog, and it works well. But I have found the following problem:

  1. I capture 3 lines. I call the function to calculate the line total on the OnAterGetRecord trigger, as well as Quantity OnValidate.the total updates as expected

  2. Then I go and amend the quantity on one of the records;the total updates on that line.

  3. As soon as I move to another record, the total displayed is as it was when that record was originally entered. The displayed value changes as I move between the amended record and other records. The only way to get it to display the correct value regardless of which record I select is to press F5 to force a refresh

  4. So I am back to using Sendkeys to force the refresh on modify, insert and delete.

Do you have any further ideas on how to refresh without using Sendkeys?