Error Message Tracking
For error message tracking, you can use exceptions or object interface methods. This topic describes the methods that you can use.
EnableExceptions Method
The EnableExceptions method allows Siebel CRM to use native COM error handling. If the method is about to fail due to error, then Siebel CRM creates a COM exception and does not return the method. The COM host receives the control instead. Siebel CRM might display the error message, which is the default behavior for Microsoft Internet Explorer or Siebel VB. You cannot use script to modify this behavior.
The following code is an example of using the EnableExceptions method:
EnableExceptions(enable as integer)
Get LastErrCode Method and GetLastErrText Method
After Siebel CRM runs an object interface method, you can do the following:
To determine if Siebel CRM returned an error from the previous operation, you can call the GetLastErrCode method.
To return the text of the error message, you can call the GetLastErrText method.
For example:
GetLastErrCode() ' returns errCode As Integer
GetLastErrText() ' returns text As String