cancel
Showing results for 
Search instead for 
Did you mean: 

OnCustomActionExecuteAction display message box

John_Sommervill
Confirmed Champ
Confirmed Champ

Which implementations are able to display message boxes?  I have a custom action that executes on a Unity Form, and found an edge case where I need to notify the user to take an action outside of OnBase.  I attempted using the MessageBox with the OnCustomActionExecuteAction script, but received this error:

Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. 

 

Any ideas on how I can deliver this message to the user from this Unity Form?

 

Thanks!

John

 

4 REPLIES 4

Adam_Kuhn
Star Collaborator
Star Collaborator

Hey John --

Unity Form scripts are server-side so the dialog box would pop up in the execution environment (the server) which is why we disallow it on server scripts (all scripts that don't explicitly call themselves Client scripts). What you might do is create a custom action that hides or unhides a readonly text field that instructs the user on what they must do in order to continue on with the script, or something of that nature.

John_Sommervill
Confirmed Champ
Confirmed Champ

Hi Adam,  I like that idea.  I'll add something that notifies them when the situation occurs.  Thanks!

John_Sommervill
Confirmed Champ
Confirmed Champ

Hey Adam,

 

I've found the methods to get if a field is visible/editable, but is there a method within CreateUnityFormModifier or on the Form objects that allow you to toggle the element visibility?  I've searched the SDK models and I don't think I see one. 

 

I guess this could be accomplished by having custom actions that hide the text when it's empty, and display when it's filled, and within my script I can clear the content out.

 

That kind of brings me to another question:  Can I use the Paragraph Control to accomplish this, or should I only use the Text Box control, set to read only?

Adam_Kuhn
Star Collaborator
Star Collaborator

Hi John --

What I'd envisioned was a custom action as per your second paragraph -- there's no way to hide a control on a Unity Form from the API, unfortunately. I don't see why you wouldn't be able to use the Paragraph control for this, though.