child page filter setting issue

arindamarindam Member Posts: 176
edited 2010-07-10 in NAV Three Tier
Hi,

I am facing a problem with NAV 2009 RTC SP1. This is related to a sublink form.

The problem is:
1. I have two pages. For example HeadPage and ChildPage.
2. HeadPage is linked with HeadTable and ChildPage is linked with childTable.
3. HeadPage contains few fields like, Emp Name, Emp Address.
4. ChildPage contains a grid which holds employee education details which comes from ChildTable.
5. HeadTable and ChildTable has a parent child relationship.
6. If I select Employee "A" then I should get the education details of employee 'A' at the subpage which is linked at headpage.
7. My problem is I am not able to filter childpage records from headpage. All records of Childtable are getting displayed at the grid.
I used follwoing codes:

OnOpenPage()
{

childtable.SETRANGE(recLine.AVA_TaxHdrID);
childtable.SETRANGE(childtable.headtableid,variableheadtableid);
IF childtable.FIND('-') THEN BEGIN
CurrPage.sfLine.FORM.SETTABLEVIEW(childtable);
END;

}
//sfLine is the subpage which is linked with childtable
Please let me know if you need any further elaboration of the issue.

Please help.

Thanks and Regards,
Arindam

Answers

  • tjbondtjbond Member Posts: 1
    I may be missing something but...why don't you have a parent-child page with the child defined as a part with the SubFormLink set to link to the parent.

    For example Sales Order Page has SalesLine defined as a part with "Document No.=FIELD(No.)" as the SubFormLink.

    Tom
  • arindamarindam Member Posts: 176
    Thank you very much. This solve my problem. I set the SetFormView and SetFormLink properties and it worked.
Sign In or Register to comment.