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).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
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).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
No comments:
Post a Comment