URL in message box from BPM

,

Hello everyone. I’m trying to put a URL into a message box (generated from a BPM). I’ve tried just typing the URL and I’ve tried it as an HTML tag within the body of the message template. Both ways look ok, but the link isn’t clickable on the popup. Does anyone have any ideas on what I’m missing?
Thanks.

Does Ctrl Click Work?

Nope

How about the BPM updates a main menu item that references a URL, then use ProcessCaller.LaunchForm to launch it.

Thanks for the reply. I know how to use ProcessCaller.LaunchForm in a customization, but I can’t seem to figure out how to use it in a custom code block of a BPM. Do you have any tips?

At first I tried launching it from a Cust Code widget, but got stymied when I couldn’t figure out what reference or assembly was needed.

I Switched to trying it as code in a customization of a BPM Form but ended up getting:

image

:thinking:

Maybe the LaunchForm() isn’t the way to go…

I spoke too soon! I had the Menu set as a URL Link. I changed it to External process:
image

Now when the code in the BPM form runs, it launches the browser and opens the page specified in the menu item.

Now you’ll have to see if updating the Menu table via code (changing Menu.Program to point to your desired URL), will work, or if its that annoying “menus are only loaded during startup”, and changes don’t take effect until the next tim you launch the client.

Yes, that’s exactly where I’m stuck. So you didn’t end up using an “Execute Custom Code” widget in the BPM? I’m trying to get my scenario working that way in a Method Directive BPM. I see you’re referencing a BPM form customization. I’m not familiar with those. I will have to do some research on that.
Thanks!

I only went with the BPM form, as I found sample code (on here) on launching a menu item

Ok, I know a little bit about BPM forms now and I like them! LOL.
I created a menu item in the regular client to open the URL and was trying to have the customization on the BPM form open that menu item. Are we not able to call a menu from MES to the regular client like that? I’m getting this error.
image

I’m guessing that you’d need to add the menu item to the MES menu to. We don’t use MES, so I’m not sure if it can be added as a process menu.

You could just pass back an indicator and message to the UI using the callContext and then use the UI side to do something like this. Clicking yes would start their default browser and open the site. Just another option.

1 Like

And would that be a customization in the BPMForm?

And if so, what would be the code to do that?

You could do it in the BPM Form Customization or just return it to the User Interface that was calling the BPM. Let’s say the BPM passed back a CheckBox that indicated to display the message and then a Character field that becomes returnURL below. Basic example without BpmData hooks.

DialogResult dialogResult = MessageBox.Show(string.Format("More information can be found at {0}. Would you like to open this site?",returnURL), "Question", MessageBoxButtons.YesNo);
		if(dialogResult == DialogResult.Yes)
		{
			System.Diagnostics.Process.Start(returnURL);
		}
2 Likes

Here is if you want to get fancy :slight_smile: you can take out sections you dont want and even further customize it and use full html in the text such as <h1> etc.

image

Infragistics.Win.UltraMessageBox.UltraMessageBoxManager.Show(
	new Infragistics.Win.UltraMessageBox.UltraMessageBoxInfo {
		Caption = "Title Here",
		TextFormatted = "<a href=\"https://www.google.com/\">Click Here</a> to open up the google!",
		Style = Infragistics.Win.UltraMessageBox.MessageBoxStyle.Standard,
		HeaderFormatted = "<i>Do you want to continue?</i>",
		FooterFormatted = "Link to <a href=\"http://www.e10help.com\"> E10Help</a>.",
		Icon = MessageBoxIcon.Error,
		Buttons = MessageBoxButtons.YesNo,
		MinimumWidth = 400
	}
);

UltraMessageBox is as the name implies (ultra!) lol
image

image

image

4 Likes

Thanks for everyone’s replies! I learned a lot from this post! Ultimately, it was another post that cleared it up for me. I ended up using a customization on the MES ShiftSelect form. Thanks to @utaylor for the answer in this other post! :slight_smile: