Hello,
This is in continuation of post
Correct COC sequence - Dynamics 365 Finance Forum Community Forum
but I wanted this to be a separate post.
When a planned order is approved, then we want a log of it completed. The table exists but only has the following methods show
initFromKanban
initFromReqTrans
exist
find
shouldThrowExceptionOnZeroDelete
In AX2012 our code was put inside the class ReqTransPoMarkFirm in the method createReqTransFirmLog
protected void createReqTransFirmLog(
ReqTrans _reqTrans,
InventTransType _inventTransType,
InventTransRefId _inventTransRefId,
InventTransId _inventTransId)
{
ReqTransFirmLog reqTransFirmLog;
if (!_reqTrans.IsDerivedDirectly)
{
reqTransFirmLog = this.initReqTransFirmLog();
reqTransFirmLog.initFromReqTrans(_reqTrans);
reqTransFirmLog.InventTransType = _inventTransType;
reqTransFirmLog.InventTransRefId = _inventTransRefId;
reqTransFirmLog.InventTransId = _inventTransId;
reqTransFirmLog.insert();
}
}
basically it's the same as the post above, where I would want to add some lines in the if statement updating some more records in that table.
Since I know now that is not best practice, or even possible, I thought I would try the same as before and extend the Update method. But since this one is calling the insert method, I thought I would extend that.
But I don't see it in the methods of that table. Do I just call it anyway? How will I reference what record I'm dealing with at that time?
I hope this makes sense. Please help.