How to launch the internet browser with a data field bound to URL data?

While working on a project, I figured out a way in AX that could trigger your system default internet browser within the AX. Many of you already have seen this while playing with SSRS or EP when you click on ‘view in browser’ kind of a buttons.

Its really simple. For the sake of example, suppose we have a stringEdit control (name: URL) with a normal button. There is a method urlLookup() in the global infolog instance that when executed opens up the default browser with the website link provided as the parameter.

Write the following code in the click event of the button ‘View in browser’.

void clicked()
{
    infolog.urlLookup(URL.text());
}

Alternatively, if you have a databound field, you can extend it from WebsiteURL EDT to get a small web lookup icon on the form control that takes you to the browser. No coding needed.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: