Hi everyone, Am new to Dynamics 365. I am working on report "InventOnhand". Actually I have duplicated the report along with its table and classes, and I added two new fields in a table. I want to show data for two new added fields but for that i need "inventDimId" against each record so that I can initialize new fields against each record. But the problem is _inventDim.inventDimId and _InventSum.inventDimId in RPD class returns an empty string in each iteration while populating "inventOnhandTmp" table. Can anybody have an idea how to get inventDimId in RDP class for this report?
code is added and I highlighted that line which returns empty string. Its a method of RDP Class and has been called from "processReport" method. I tried different tricks but didn't get useful results.
private void insertTmpTable(InventSum _inventSum, InventDim _inventDim)
{
InventIAvailability inventAvailability = InventAvailabilityProvider::findBySumDim(_inventSum, _inventDim).parmInventAvailability();
inventOnhandTmp.ItemId = _inventSum.ItemId;
inventOnhandTmp.Deducted = _inventSum.Deducted;
inventOnhandTmp.Ordered = inventAvailability.ordered();
inventOnhandTmp.PostedQty = _inventSum.PostedQty;
inventOnhandTmp.Received = _inventSum.Received;
inventOnhandTmp.AvailOrdered = inventAvailability.availTotal();
inventOnhandTmp.AvailPhysical = inventAvailability.availPhysical();
inventOnhandTmp.ReservOrdered = inventAvailability.reservOrdered();
inventOnhandTmp.ReservPhysical = inventAvailability.reservPhysical();
inventOnhandTmp.AWC_CompanyLogo = FormLetter::companyLogo();
inventOnhandTmp.AWC_InventDimId = _inventDim.inventDimId;
// Fields might not have been selected on the specified buffers, or might have been updated since selection
_inventDim.checkInvalidFieldAccess(false);
inventOnhandTmp.InventDimFieldsMap::initAllDimensionsFrom(_inventDim);
inventOnhandTmp.insert();
}
*This post is locked for comments
I have the same question (0)