AX 2012 and AX7 - Open URL from X++ code

Below statement will quickly open google website in default browser.

In AX 2012

Infolog.urlLookup("www.google.com");

Or

Any Files like XML file

Infolog.urlLookup("C:\\Users\\shyamsundar.kanna\\Documents\\Testing\\DeliveryNote.xml");

==============================================================

In AX7

Add new Runnable Class from Project in VS and include below code.

class shyamBrowserJob
{      
    /// <summary>
    ///     Runs the class with the specified arguments.
    /// </summary>
    /// <param name = "_args">The specified arguments.</param>
    public static void main(Args _args)
    {
        Browser browser = new Browser();
        browser.navigate('http://shyamkanna.blogspot.ae/', true, false);
    }
}

Comments

Post a Comment