Hi, I am currently working on retrieving the CovInventdimField from the ReqTrans table following the explosion of the salesline. The process involves the creation of a new record in both InventDim and ReqTrans tables after the explosion update.
However, I am encountering an issue with the code, as an error stating “Object reference not set to an instance of an object” is being raised. I have included the relevant code snippet below:
[ExtensionOf(classStr(ReqCalcExplode))]
final class ReqCalcExplode_Extension
{
public void run()
{
next run();
InventDimId _covInventDimId;
ItemId _itemid;
ReqTrans _issue, receipt;
receipt = this.pmfCoCovCreatePlannedOrder(_issue);
if (!receipt)
{
info ("not found");
}
else
{
_itemid = receipt.ItemId ;
_covInventDimId = receipt.CovInventDimId;
info(strFmt("CovInventDimId for ItemId %1: %2", _itemid, _covInventDimId));
}
}
}
the class ReqCalcExplode extends ReqCalc class. The method pmfCoCovCreatePlannedOrder is defined in ReqCalc and needs to be invoked successfully.
I appreciate any guidance or insights you can provide to help me pinpoint and address the issue.