Forum Discussion
You've mentioned a couple of different requirements but the most basic "Message Here. Click OK" dialog box can be quite easily achieved. There is some sample code in there already when you create a new dashboard extender rule. The code looks like the below. I chopped and mashed some stuff together from something already written but you should get the picture:
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardExtenderArgs) As Object
Try
Select Case args.FunctionType
Case Is = DashboardExtenderFunctionType.LoadDashboard
If args.FunctionName.XFEqualsIgnoreCase("setComponentValues") Then
If args.LoadDashboardTaskInfo.Reason = LoadDashboardReasonType.Initialize And args.LoadDashboardTaskInfo.Action = LoadDashboardActionType.BeforeFirstGetParameters Then
Return nothing
End If
End If
Case Is = DashboardExtenderFunctionType.ComponentSelectionChanged
Select Case args.FunctionName
Case "something"
Dim selectionChangedTaskResult As New XFSelectionChangedTaskResult()
selectionChangedTaskResult.IsOK = True
selectionChangedTaskResult.ShowMessageBox = True
selectionChangedTaskResult.Message = "Hello World. Click OK to continue."
Return selectionChangedTaskResult
Case "somethingElse"
Return nothing
End Select
End Select
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
Thanks for your reply DanielWillis .
I wasn't aware of this way to display a message, however, it is not exactly what I'm looking for. What I'd like is to be able to use the MsgBox function (https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/msgbox-function) from VB (or an alternative that provides the same functionality) so I can display a message to the user the same way I throw an error, but without it being an error and killing the execution.
Related Content
- 2 years ago
- 6 months ago
- 7 months ago
- 4 months ago
- 10 months ago