Thursday, May 4, 2017

AX 2012 CHECK IF DIMENSION EXIST OR NOT X++ CODE

CHECK IF DIMENSIONS EXIST OR NOT


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:

Post a Comment

Related Posts Plugin for WordPress, Blogger...