Friday, June 11, 2010

Open a URL in a Browser from X++

Here is an easy way, using CLR, to load a URL in the client’s default browser via X++, from say, a button’s clicked event:


void clicked()
{
System.Diagnostics.Process pr = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo('URL HERE');
pr.set_StartInfo(si);
pr.Start();
}

2 comments: