O'Reilly logo

Microsoft Dynamics NAV 7 Programming Cookbook by Rakesh Raul

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating the subform page from a parent page

The subform page only reloads data when it knows it needs to. Unfortunately, it is not very smart. This recipe will show you how to force a subform page to refresh itself.

How to do it...

  1. Create a new page from Object Designer.
  2. Choose the Create Blank Page option to design a page from scratch.
  3. Add the following global variables to the page:

    Name

    Type

    A

    Integer

    B

    Integer

  4. Next, add a global function called SetValues.
  5. Add the following parameters to the function:

    Name

    Type

    Aparam

    Integer

    Bparam

    Integer

  6. Now add the following code to the function.
    A := Aparam;
    B := Bparam;
  7. Add another global function called UpdateSelf.
  8. Then add the following code to the function:
    CurrPage.UPDATE;
  9. From the Page Designer

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required