Hi, I want to insert the record from prodTable and InventDim table to userCreated table. while creating production order-> record will store in Prodtable and invent dim table symultaniously i want to insert that record in my usercreated table. I want get the record values from the INventDim table . Any one can help. Thanks IN adbance Sunil kumar
Put your code in the insert method of ProdTable after super()…
By using inventDimId present in the ProdTable you get the inventDim Table details…
Here I put code in ProdTableCreate(Form)->canClose()(Method) Before super(). in following method I am not getting InventSerialId value other than i am getting all field values, I found this is Number sequence so after canclose() method its generating NumSeq so I found that in InventDim(Table)->create()(method) the InventSerialId is getting. how can i get this InventSerialId to my table to followin method, if(ProdTable.RecId && InventDim.RecId) { select ProdTable //join InventDim where ProdTable.InventDimId == inventDim.inventDimId; //info(InventDim.configId); ttsbegin; _G7InventSerial.InventSerialID = InventDim.inventSerialId; _G7InventSerial.configId = InventDim.configId; _G7InventSerial.inventDimId = InventDim.inventDimId; _G7InventSerial.insert(); ttscommit; } Thanks Sunil
Hi Kranthi see this u can understand clearly, Here I put code in ProdTableCreate(Form)->canClose()(Method) Before super(). in following method I am not getting InventSerialId value other than i am getting all field values, I found this is Number sequence so after canclose() method its generating NumSeq so I found that in InventDim(Table)->create()(method) the InventSerialId is getting. how can i get this InventSerialId to my table to followin method or to my Table if(ProdTable.RecId && InventDim.RecId) { select ProdTable //join InventDim where ProdTable.InventDimId == inventDim.inventDimId; //info(InventDim.configId); ttsbegin; _G7InventSerial.InventSerialID = InventDim.inventSerialId; _G7InventSerial.configId = InventDim.configId; _G7InventSerial.inventDimId = InventDim.inventDimId; _G7InventSerial.insert(); ttscommit; } Thanks Sunil
Hi Kranthi see this u can understand clearly,
Here I put code in ProdTableCreate(Form)->canClose()(Method) Before super().
in following method I am not getting InventSerialId value other than i am getting all field values,
I found this is Number sequence so after canclose() method its generating NumSeq so I found that in InventDim(Table)->create()(method) the InventSerialId is getting.
how can i get this InventSerialId to my table to followin method or to my Table
if(ProdTable.RecId && InventDim.RecId)
{
ttsbegin;
select ProdTable
_G7InventSerial.InventSerialID = InventDim.inventSerialId;
_G7InventSerial.configId = InventDim.configId;
_G7InventSerial.inventDimId = InventDim.inventDimId; _G7InventSerial.insert();
ttscommit;
}
Thanks Sunil
Hi sunil,
for InventSerialId use this code,
_G7InventSerial.InventSerialID = InventDim::find(prodTable.InventDimId).InventSerialId;
(or) _G7InventSerial.InventSerialID = prodTable.inventDim().inventSerialId;