preloader-matrix

Alfasith

Find methods() / inserting the values from one form where action is taking place is to be reflect in another form in Dynamic AX

Hi,

public void modified()
{
SMAServiceObjectTable   smaServiceObjectTable;
SMAServiceOrderTable    smaServiceOrderTable, smaServiceOrderTable1;
//Tables I used here and smaServiceOrderTable1 will act as datasource that I added
TableId                 loctableid;
super();
loctableid = element.args().record().TableId;
if (loctableid == tableNum(smaServiceOrderTable))
smaServiceOrderTable = element.args().record();
ttsBegin;
//Updated by Alfasith- This to display in OrderFormTable
select forUpdate smaServiceOrderTable1 where smaServiceOrderTable1.RecId == smaServiceOrderTable.RecId;
smaServiceOrderTable1.AssetId = smaServiceObjectTable::find(SMAServiceObjectRelation.ServiceObjectId).AssetId;
smaServiceOrderTable1.VehicleRegistrationNo  =  AssetTable::find(smaServiceObjectTable::find(SMAServiceObjectRelation
.ServiceObjectId)
.AssetId).SerialNum;//SMAServiceObjectTable::find(SMAServiceObjectRelation
.ServiceObjectId)
.vehicleRegistrationNo();
smaServiceOrderTable1.VehicleType  = SMAServiceObjectTable::find(SMAServiceObjectRelation
.ServiceObjectId)<.br>.vehicleType();
smaServiceOrderTable1.Make  = AssetTable::findByServiceObjectId(SMAServiceObjectRelation.ServiceObjectId)
.Make;
smaServiceOrderTable1.NQ_ServiceCentreCode  = smaServiceObjectTable::find(SMAServiceObjectRelation.ServiceObjectId)
.serviceCentre();
smaServiceOrderTable1.update();
ttsCommit;
}

This above sample makes the sense of adding new fields in the form where two forms are involved and results should reflect in another form

Leave a Reply

Your email address will not be published.