Allan Wallis
12/20/2005 10:41:00 PM
Its magic! or more accurately dynamic linking.
The contact person table includes the business relation ID, when you call
the business relation table the system knows from the data dictionary that
the business relation ID is a link to the Business Relation table.
The same concept is widely used in Axapta, e.g. customer transactions are
dynamically linked to the customer table.
contact person table includes customer account, vendor account as well as
busrelaccount so it will link dynamically to any of those tables.
The link is deffined in the extended datatype SMMRelationAccount, look at
the node called relations
"Pete" wrote:
> Thanks for your answer.
>
> But i can't see an assignment in the source.
> Furthermore the return value of element.args().record() is Common.
> How should be known without checking that this is a record from contactPerson?
> How does the link to smmBusRelTable work?
>
> Thanks in advance.
>
> "BaSt" wrote:
>
> > I think the selection is done in the SmmBusRelTable form.
> >
> > in the init method you can find the following text:
> > ...
> > // If form is not opened from an other datasource, ok to filter on
> > employee.
> > if (!(element.args().record() || element.args().lookupField()))
> > ...
> >
> > Where it seems to check if there are arguments from another datasource...
> > hope this helps
> >
> > "Pete" wrote:
> >
> > > Starting Point:
> > > I have marked one contact person in the form smmContactPerson.
> > > From this point i call the form smmBusRelTable by means of the
> > > BusinessRelationMenuItem button.
> > > Then the corresponding business relation in the form smmBusRelTable is
> > > displayed.
> > > The current record of contactPerson will be transfered to the form
> > > smmBusRelTable ( args().record() ).
> > > I don't understand the mechanism how the corresponding smmBusRelTable record
> > > will be selected.
> > > I can't see anything like smmBusRelTable =
> > > smmBusRelTable::findBusRelRecord(contactperson)
> > >
> > > Can anyone give me a hint for better understanding. Thanks!
> > >
> > >
> > >