Thursday, 27 April 2017

Code to check if the Dimension exist for the item AX 2012

The following code is used to check if the Dimension exist for item.
while select inventTable where inventTable.DefaultDimension == 0
    {
       
         if(EcoResStorageDimensionGroupItem::findByItem(inventTable.DataAreaId, inventTable.ItemId).StorageDimensionGroup
            && EcoResTrackingDimensionGroupItem::findByItem(inventTable.DataAreaId, inventTable.ItemId).TrackingDimensionGroup)
        {
            continue; // exist
        }
        else
        {
             // not exist do some thing.
        }
}

No comments:

Import and Export file from BLOB storage Account(Azure) in D365 F&O using X++

  Import and Export file from BLOB storage Account in D365 F&O using X++ Import: /// <summary> /// MKInventQualityOrderLineService...