BPM to pull up a webpage when starting a activity in MES

,

Hello I’m working on some code for MES I want a specific webpage to popup when I start a job operation in MES is there a way that is possible through custom code in a BPM?

1 Like

Not that I know of. You’ll need a customization for this.

1 Like
System.Diagnostics.Process.Start("http://www.webpage.com");

But doing this server side doesnt seem applicable. You could potentially send back a message via context to tell your UI to do it, but even still then, that’s a customization

Yah that looks to be the case thank you

You could do a UI Customization:


If you have ever used the Customer Shipment Entry form and clicked on an UPS Tracking Number, you noticed a little browser window pop-up with UPS Tracking Information.

You can make use of the same Helper Ice.Lib.Customization.CustomWebBrowserDialog method in your Epicor Customizations, without any dependencies.

Helper Method: Add to your Customization

private void LaunchURL(string url, string title = "", int padding = 65)
{
   Ice.Lib.Customization.CustomWebBrowserDialog uiWebBrowser = new Ice.Lib.Customization.CustomWebBrowserDialog();

   // Find Current Form so we don't hard-code it
   Ice.Lib.Framework.EpiBaseForm f = (Ice.Lib.Framework.EpiBaseForm)csm.PersonalizeCustomizeManager.TopControl.FindForm();
   uiWebBrowser.Width = f.Width - padding;
   uiWebBrowser.Height = f.Height - padding;
   uiWebBrowser.Text = title;
   uiWebBrowser.HomeURL = url;
   uiWebBrowser.StartPosition = FormStartPosition.CenterScreen; // If you don't center you can use .Top and .Left
   uiWebBrowser.Show();
   uiWebBrowser.OnRefresh(); // Loads URL

   // Advanced Things
   // Once the Page is "Initialized" Only can you make use of things such as
   // uiWebBrowser.browserPanel.browserMainPanel.HtmlControl.Document.Title
   // uiWebBrowser.browserPanel.browserMainPanel.HtmlControl.DocumentText
   // uiWebBrowser.browserPanel.browserMainPanel.HtmlControl.Document.DomDocument

   // ADV Note: browserPanel is Private if you want to Inject HTML you must use Reflection
}

Let’s assume you are dealing with Vehicles and would like to add a button to the Serial Number Tracker form that shows details for the loaded VIN (Serial Number) from NHTSA.

// Assuming you know how to add a button and a Click event via Wizards
private void btnVINDetails_Click(object sender, System.EventArgs args)
{
   EpiTextBox txtSerialNumber = (EpiTextBox)csm.GetNativeControlReference("46567b2e-6bc0-4967-be35-a0ec6843838f");
   string url = "https://vpic.nhtsa.dot.gov/decoder/Decoder?vin=";
   LaunchURL(url + txtSerialNumber.Text, "NHTSA VIN Lookup");
}

Sample URLs:

Fedex Tracking: 
https://www.fedex.com/apps/fedextrack/index.html?tracknumbers=_YOUR_VALUE_

USPS Tracking:
https://tools.usps.com/go/TrackConfirmAction?tLabels=_YOUR_VALUE_

UPS Tracking:
https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=_YOUR_VALUE_

NHTSA VIN Lookup:
https://vpic.nhtsa.dot.gov/decoder/Decoder?vin=_YOUR_VALUE_

In 10.2.300 you could probably even do a Web Page UI Menu and just Lunch from MES.

6 Likes

Or you could just embed a dashboard with a URL viewer in it. You could make the dashboard pop up if you didn’t want to embed it. The viewer is one of the options in the dashboard menu.

2 Likes