› Dynamics 365, Enterprise › Open URL in Web browser from D3fO using X++

Open URL in Web browser from D3fO using X++

 Sohagani Shah   Leave a comment

In this blog article, we will see how we can open a URL in web browser from D3fO using X++ code. It is achieved using Browser class which extends System Class xBrowser having 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 same tab or new tab
  3. showExitWarning (Boolean) – Prompt a dialog to exit the current page.

Create a new Class:

class CFSBrowseURL
{
}

Call URL:

public static void main(Args _args)
{
 Browser browser = new Browser();
 browser.navigate('www.cloudfronts.com', true, false);
}

So, this will open URL within a new tab in browser using X++. Let me know your reviews and queries. I will soon come up with more articles, as I further explore D365 Operations.


Liked it? Share it.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.