[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

Calling Form smmBusRelTable from Form smmContactPerson

Pete

12/15/2005 9:09:00 AM

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!



4 Answers

BaSt

12/15/2005 3:31:00 PM

0

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!
>
>
>

Pete

12/16/2005 8:27:00 AM

0

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!
> >
> >
> >

Allan Wallis

12/20/2005 10:41:00 PM

0

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!
> > >
> > >
> > >

Pete

12/21/2005 7:09:00 AM

0

Thank you very much Allan.

"Allan Wallis" wrote:

> 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!
> > > >
> > > >
> > > >