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

Transaction log backup

In this post, i want to populate good to know information about log backup in SQL Server. Query to know the history of transaction log ba...