Monday, 23 December 2024

Open URL in browser using X++

 In this blog article, we will see how we can open a URL in a web browser using X++ code. It is achieved using Browser the class which extends System Class Browser having the only method navigate(). It has three parameters from which only first is mandatory:

1.       downloadURL (string) – URL you want to browse.

2.       openInNewTab (Boolean) – It is used to specify URL should be open in the same tab or new tab

3.       showExitWarning (Boolean) – Prompt a dialog to exit the current page.

class OpenURL

{

   public static void main(Args _args)

   {

        Browser browser = new Browser();

        browser.navigate(SystemParameters::find().DALPowerBILink, truefalse);

        //OR

        browser.navigate("https://jonesd365.blogspot.com/"truefalse);

    }

}

So, this will open URL within a new tab in the browser using X++.

No comments:

Post a Comment

Clean up jobs in D365FO

  https://anithasantosh.wordpress.com/2024/11/07/clean-up-jobs-in-d365fo/