Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Using a field to edit result in another table with the same field

$
0
0

Looking at the top options you can see I have entered "PUR_027655" and Serial Number - "348". PUR number fills the table, and the 348 is a filter that causes the second column in the results to have an out of range symbol if the serial number is wrong. As you can see in the middle table item number "1107240" has one entry and it is out of range. What my goal for the third table to recognize that there is one entry for that number and because of that it should also mark out of range in the third table. 

I've got methods titled "isInstanceCovRecordInRange" and "isDetailRecordInRange", which are in charge of deciding if a record is in range or not (middle and bottom table respectively) based on filtered options at the top of the form. 

if (receivingDashboardOptions.parmProjId() || receivingDashboardOptions.parmSerialNum() || receivingDashboardOptions.parmSalesId() || receivingDashboardOptions.parmParentItemId())
{
if (!ReceivingDashboardInstanceCovTmp::find(receivingDashboardInstanceCovTmp,
_receivingDashboardDetailTmp.InventTransType,
_receivingDashboardDetailTmp.InventTransRefId,
_receivingDashboardDetailTmp.ItemId))
return NoYes::No;
}

This is some existing code in the method that I think I can base this new code off of. Maybe by using the "find" (seen below) method that exists in the middle table. These are all temp tables that are built within a larger "ReceivingDashboardGeneration" class.

static server ReceivingDashboardInstanceCovTmp find(
ReceivingDashboardInstanceCovTmp _receivingDashboardInstanceCovTmp,
InventTransType _inventTransType,
InventTransRefId _inventTransRefId,
ItemId _itemId)
{
ReceivingDashboardInstanceCovTmp receivingDashboardInstanceCovTmp;

receivingDashboardInstanceCovTmp.setTmpData(_receivingDashboardInstanceCovTmp);
select firstonly receivingDashboardInstanceCovTmp
where receivingDashboardInstanceCovTmp.InventTransType == _inventTransType &&
receivingDashboardInstanceCovTmp.InventTransRefId == _inventTransRefId &&
receivingDashboardInstanceCovTmp.ItemId == _itemId &&
receivingDashboardInstanceCovTmp.OutOfRange == NoYes::No;

return receivingDashboardInstanceCovTmp;
}

I should be able to provide more information if needed.


Viewing all articles
Browse latest Browse all 72043

Trending Articles