Get display value from ledger dimension in D365FO

 Last time, I have shared the code about how to Get Main Account from Ledger Dimension in D365FO. In this article, I am sharing the one line code to get the display value using LedgerDimensionFacade class. See the following code:

//Get Display value from LedgerDimension
//The argument (LedgerDimensionValue) is LedgerDimension which you can get from table or any other source as per your requirement

info(strFmt("%1",LedgerDimensionFacade::getDisplayValueForLedgerDimension(LedgerDimensionValue)));

Comments

Popular posts from this blog

Dynamics Ax 2012 Interview Questions:

X++ code to create a customized lookup on form

Oops concept in AX