Friday, October 30, 2009

Alternative method to open a webpage from Ax

When you want to show your users a webpage from within Ax, you can use the ShellExecute command. Like this

WinApi::shellExecute('www.blogger.com');

You can use this format to open/show a specific XML file from disk as well. Like this:

WinApi::shellExecute('yourfile.xml','',@'C:\XMLFolder');

This will fire up your XML editor/viewer (possibly MS Internet Explorer) and display the specified file.
As an alternative, you can use the infolog for this as well. Like this:

infoLog.urlLookup('www.blogger.com');

or

infoLog.urlLookup(@'C:\XMLFolder\yourfile.xml');

This alternative method does not require extended security measures, like required when you use the WinAPI functions.

No comments:

Post a Comment