Options

Part Functions not Available from Main Page?

bhalpinbhalpin Member Posts: 309
edited 2012-06-08 in NAV Three Tier
Hi.

I have created a page with the source-table Item. In that page I have created several Groups, and within each a Part with Subtype Page. So far this seems fairly parallel to forms and sub-forms.

The main page has controls for date filters, etc. that I need to transmit down to the sub parts/pages. In a form this was easy - you added a function to the sub-form and called it from the main form.

I tried the same here - added a function to the "sub-page", but back in the main page when i bring up the Symbol Menu, under CurPage -> Controls I see the Group and the Page - but when I drill down into Functions for the page there are none listed.

Can I not call a function in a sub-page like I could with a sub-form?

If not, is there another way to transmit information to the sub-page?

Thanks!

Answers

  • Options
    bhalpinbhalpin Member Posts: 309
    I got it.

    You have to create a variable of type Page with the subtype the (sub) page you want to configure. The functions of that page are then available through that variable.
  • Options
    jdownjdown Member Posts: 8
    That approach will work, except when you specifically need to reference something from that particular instance of the sub page. There is a strange syntax (as of NAV 2009 R2) that you can use to access the exact sub page instance set in your main page (think pagepart in a factbox, where you need to set or access a variable or function that applies to the instance running within your main form).
    CurrPage."NameOfSubPageInstance".FORM."FunctionName";
    

    Note the call to .FORM (even though we are talking about a page).
Sign In or Register to comment.