HTML5 portal MsgBox from request property

Hi,

I have created a request property that checks if a user-entered group name (cn) is unique. If the entered value already exists, the user should get a dialog box explaining the error. I have the following code in the Validation script of the request property parameter:

Dim f As ISqlFormatter = Session.SqlFormatter
Dim Where As String = f.Comparison("cn", Convert.ToString(Value), ValType.String)

If Session.Source.Exists("ADSGroup", Where) Then
	MsgBox("Name already in use")
End If

The problem is that the user is presented with the generic error message " An error occurred while processing your request."  and the following message shows in the log on the web server:

ERROR (    WebLog ) : An error occurred while processing the request: PUT https://s34-t-web001/ApiServer/portal/cartitem/interactive System.Exception: An error occurred while processing the request: PUT https://s34-t-web001/ApiServer/portal/cartitem/interactive ---> VI.Base.ViException: Error running script 'Valid_32bf25d2_3be8_4479_a789_121606c646b7'. ---> System.NotSupportedException: No Message Boxes are to be shown in a service.
   at VI.DB.Implementation.Connection.ShowMessage(String message, String title, MessageBoxButtons buttons, MessageBoxIcon icon)
   at DynScripts.Parameters_WWDaGKbW9CjJVcno9EENDuwFdcqhJVj.Valid_32bf25d2_3be8_4479_a789_121606c646b7(DialogParameterSet ParameterSet, DialogParameter Parameter)
   --- End of inner exception stack trace ---
   at VI.DB.Scripting.ScriptRunner.Eval(String key, Object[] parameters)
   at VI.DB.DialogParameter.<>c__DisplayClass91_0.<OnSetValueAsync>b__0(DialogParameter p)
   at VI.DB.DialogParameter.CallBottomToTop(Action`1 action)
   at VI.DB.DialogParameter.OnSetValueAsync(Object value, CancellationToken cancellationToken)
   at VI.Base.Parameter.SetValueAsync(Object value, CancellationToken cancellationToken)
   at QBM.CompositionApi.Data.DialogParameterAdapter.<PutAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at QER.CompositionApi.ITShop.Parameter.CompositeParameterModel.<ApplyAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at QER.CompositionApi.ITShop.CartItemExtendedData.<ApplyAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at QBM.CompositionApi.Handling.Interactive.InteractiveEntityHelper.<GetAndModifyInteractiveEntityAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at QBM.CompositionApi.Handling.WriteInteractiveRouteProvider`1.<<CreateRoutesAsync>b__3_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at QBM.CompositionApi.ApiManager.JsonResponseBuilder.InnerJsonResponseBuilder.<WriteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at QBM.CompositionApi.Compression.CompressionResponseBuilder.CompressedResponse.<WriteAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at QBM.CompositionApi.ApiManager.MethodRequestHandler.<SendAsync>d__12.MoveNext()
   --- End of inner exception stack trace ---

Is there another way to present the user with an informative message box if an invalid input is entered? This is in Identity Manager 9.1 and the new Angular/HTML5-portal