I have created table extension for InventJournalTrans by using Serialization process.
When I tried to pack the table it is not working.
This is the code I’m using to pack the table.
select Recid from inventJournalTrans
where inventJournalTrans.RecId == _inventJournalTransRecid;
inventJournalTransExt = inventJournalTrans.inventJournalTransExt();
inventJournalTransExt.SendToWMS = Noyes::Yes;
inventJournalTrans.packInventJournalTransExt(inventJournalTransExt);
Please correct where I am doing wrong.
Thanks in advance.
I think you should be calling the inventJournalTrans.update() after pack.
Thanks for the reply Kranthi,
No I debugged the code, after inserting the data into inventJournalTrans only I’m calling the pack
here is the path.
BomReportFinish.updateBOMConsumption();
line num 91 : journalTransData.insert();
after above line I wrote below code to pack the table
select Recid from inventJournalTrans
where inventJournalTrans.RecId == _inventJournalTransRecid;
inventJournalTransExt = inventJournalTrans.inventJournalTransExt();
inventJournalTransExt.SendToWMS = Noyes::Yes;
inventJournalTrans.packInventJournalTransExt(inventJournalTransExt);
In that case you need to be doing it before the insert(). Look at \Classes\SMAServiceFunctionLine_Transfer\createProjJournalLine_ItemConsum
If you want to do it after the insert(), then you should call the update.
Kranthi Can you please suggest how to call update here
why cannot you move your code to the place before journalTransData.insert();?
I tried to move my code above it. Still facing same issue.
While debugging the code, I can see that inventjournalTrans recid is creating in journalTransData.insert(); method.
Can you show your code (after moving it to before insert)?
You don’t have to do a select, the below code is not required if you are moving the code before insert()
select Recid from inventJournalTrans
where inventJournalTrans.RecId == _inventJournalTransRecid;
Thanks Kranthi Working fine,
I have commented this code
//select Recid from inventJournalTrans where inventJournalTrans.RecId == _inventJournalTransRecid;
Now its working before insert the actual table and packing the data.
inventJournalTransExt = inventJournalTrans.inventJournalTransExt();
inventJournalTransExt.SendToWMS = bomExt.SendToWMS;
inventJournalTrans.packInventJournalTransExt(inventJournalTransExt);
journalTransData.insert();