Hi Sonny,



Thank you so much! It works.



  _____ 

From: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Sonny Wibawa Adi
Sent: 17 October 2005 04:08 AM
To: development-axapta@yahoogroups.com
Subject: Re: [development-axapta] Form datasource ".query()" modification



Hi, christoph.malherbe,

Why do you use the code to make a dynamic link
manually?

Delete the code in executeQuery, and create relation
between VehicleTable and VehicleOwnerHistory on
VehicleOwnerHistory table.
When you create a menuitembutton on VehicleTable form
that launch VehicleOwnerHistory form, then Axapta will
create the dynamic link automatically.

If you want to learn about this, create the simplest
forms and tables. Then, use that method on your form,
because I don't see your other modifications on your
form.

Good luck.

--- cdlmalherbe01 <[EMAIL PROTECTED]>
wrote:

> I have a table "Vehicles" which contains 2 fields,
> "VehicleId"
> and "OwnerId".
>
> "VehicleId" is the primary key for table
> "VehicleTable".
>
> When the "OwnerId" is changed, I record the value of
> the
> previous "OwnerId" in a table called
> "VehicleOwnerHistory" with
> fields "VehicleId", "OwnerId", "DateChanged" etc.
>
> From my "VehicleTable" form, I want to launch a
> form "VehicleOwnerHistory" form which shows the list
> of historical
> owners. This form is used to view and update the
> list of historical
> owners.
>
> I looked at the "LedgerTransAccount" form and how it
> is launched
> from the "LedgerTable" form to show transactions for
> the selected
> account only. The principle applies to my problem.
>
> I've adapted the code in the "InitQuery" and
> "executeQuery" methods
> of the LedgerTransAccount form:
>
> --------void
> InitQuery()---------------------------------------
>       {
>           Query query;
>           Vehicles vehicles;
>           VehicleOwnerHistory vehicleOwnerHistory;
>
>           ;
>
>           query = new
> query(querystr(vehicleOwnerHistory));
>
>           switch(element.args().dataset())
>           {
>               case(tablenum(FSMEquip)):
>                   fsmEquip = element.args().record();
>      
>                 
> query.dataSourceNo(1).addDynalink(fieldnum
> (Vehicles,VehicleId),Vehicles,fieldnum
> (VehicleOwnerHistory,VehicleId));
>
>                   break;
>
>               default:
>           }
>
>           VehicleOwnerHistory_ds.query(query);
>       }
>
> --------public void
> executeQuery()-----------------------------------
>       {
>           this.InitQuery();
>
>           super();
>       }
>
> It seems to work except for the fact that it returns
> only 1 record
> when I launch the VehicleOwnerHistory form,
> irrespective how many
> matching records exist in the VehicleOwnerHistory
> table.
>
> All help appreciated!
>
>
>
>
>
>
>
>


Best regards,


Sonny Wibawa Adi
MBS Certified Professional - Axapta 3.0 Technical
MCSD.NET
MCAD.NET


           
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/





SPONSORED LINKS


Computer
<http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=Progr
amming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvc
LTIDJ5FTkRJGsO11w>  part

Programming
<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Computer+part&
w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.s
ig=cuhEClK4dU4wapXFmKisbQ>  languages

Microsoft
<http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Pr
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yf
eG_U6QaLfPOZZIud02Fg>  axapta


Support
<http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w2=Pr
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy
8yRGMzrmxdphyITTUeqA>  exchange







  _____ 

YAHOO! GROUPS LINKS



*      Visit your group "development-axapta
<http://groups.yahoo.com/group/development-axapta> " on the web.
 
*      To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 
*      Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service.



  _____ 



[Non-text portions of this message have been removed]





YAHOO! GROUPS LINKS




Reply via email to