Thursday, June 14, 2018

Unit conversion AX 2012/ D365FO

Code below can be used for unit conversion with rounding.
 public SalesQty dtConvert(Qty _salesQty,ItemId _itemId,SalesUnit _inventUnit,SalesUnit _salesUnit )  
 {  
      SalesQty salesQty;  
      salesQty = UnitOfMeasureConverter::convert(_salesQty,  
               UnitOfMeasure::unitOfMeasureIdBySymbol(_inventUnit),  
               UnitOfMeasure::unitOfMeasureIdBySymbol(_salesUnit),  
               NoYes::Yes,  
               InventTable::itemProduct(_itemId),  
               NoYes::Yes);  
     return salesQty;  
 }  

No comments:

Post a Comment

ADFS configuration error Invalid scope names

I am about to finish On-Prem deployment, where i was facing error at   step number 18     as below: "ADFS configuration for premises ...