Handling Errors That a Siebel VB Method Returns
You must configure Siebel CRM to handle an error that a Siebel VB method returns differently from how you configure it to handle an error that a Visual Basic function or statement returns. You can use the following code to handle an error that a Siebel VB method creates. This code displays the text of the error message:
DisplayError:
If ErrCode <> 0 Then
ErrText = GetLastErrText
TheApplication.RaiseErrorText ErrText
Exit Sub
End If
Note the following:
A Siebel VB method uses numeric error codes in the range of 4000 through 4999.
DisplayError is a label and is the target of a Go To statement that exists elsewhere in the code.
The GetLastErrText method is available only through an interface that is external to Siebel Tools. You can use it in Microsoft Visual Basic but not in Siebel VB.
For more information, see Siebel Object Interfaces Reference.