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, true, false);
//OR
browser.navigate("https://jonesd365.blogspot.com/", true, false);
}
}
So, this will open URL within a new
tab in the browser using X++.
Comments
Post a Comment