change
"query.dataSourceNo(1).addDynalink(fieldnum
(Vehicles,VehicleId),Vehicles,fieldnum
(VehicleOwnerHistory,VehicleId));"
to
"query.dataSourceNo(1).addDynalink(fieldnum
(Vehicles,VehicleId),VehicleOwnerHistory,fieldnum
(VehicleOwnerHistory,VehicleId));"

--- In [email protected], "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!
>








SPONSORED LINKS
Computer part Programming languages Microsoft axapta
Support exchange


YAHOO! GROUPS LINKS




Reply via email to