>>I have a second data access element spcified for a business object, and it needs a view parameter. In the postinithook method for the bizobj, I have two View Parameters specified, where v_md is the second data access element, and v_dss and v_mm are views of other bizobjs.:
>>
>>
>>this.AddViewParameter('vp_idid', 'v_dss.iid')
>>this.AddViewParameter('vp_imid', 'v_mm.iid', 'v_md')
>>
>>
>>When I run the form, I am asked for the value of vp_imid.
>
>You almost never want a view parameter to be based on another view. The suggested method for managing view parameters is to store the value to the business object. You can then create a method to pass the new values along to the view.
>
>
>bizobj.postinithook
>This.AddViewParameter('vp_idid', 'This.dss_iid')
>This.AddViewParameter('vp_imid', 'This.mm_iid')
>
>bizobj.MyNewRequery
>LPARAMETERS tDSS_iid, tMM_iid
>This.dss_iid = tDSS_iid
>This.mm_iid = tMM_iid
>This.Requery()
>
>
>Chris.
This strikes me as making work for myself, instead of the framework making my life easier. If I have a parent/child relationship, and the child view has a view parameter based on the parent's key, why should I have to pass the key to the child bizobj whenever the parent changes? Isn't the framework supposed to do this for me?
In this particular case, the first view parameter is the parent key for the child, and the second parameter is a grandparent key because I happen to want to see all the grandchildren.
Thanks,
June