Wednesday, March 16, 2022

Job to get current Application version and Product Version in Dynamics 365 F&O via front end and X++ code

 Hi Team,

Welcome to the blog. Today I would like to share the code snippet through which we can get the current Application version and Product Version in Dynamics 365 Finance and operations.

Note: Also these details can be accessed from the AX web client ( frontend) by clicking on "About".


Application and Product version



*********************************************************************************

class TogetCurrentApplicationAndProductVersion

{

    /// <summary>

    /// Runs the class with the specified arguments.

    /// </summary>

    /// <param name = "_args">The specified arguments.</param>

    public static void main(Args _args)

    {

        str productversion, Applicationversion, productApplicationversion;


        Microsoft.Dynamics.BusinessPlatform.ProductInformation.Provider.ProductInfoProvider provider = Microsoft.Dynamics.BusinessPlatform.ProductInformation.Provider.ProductInfoProvider::get_Provider();

        productVersion = provider.get_ApplicationVersion();

        Applicationversion = provider.ApplicationBuildVersion;

        

        productApplicationversion =(strFmt("%1(%2)", productVersion, Applicationversion));


        Info(   productApplicationversion);

    }


}

********************************************************************************

Happy Daxing.. !!


No comments:

Post a Comment