ErrorDescription Property
ErrorDescription Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
The details of an error to be reported back to the audit trail.
Applies To
Type Library
Microsoft CDO Workflow Objects for Microsoft Exchange
DLL Implemented In
CDOWF.DLL
Syntax
[Visual Basic]Property ErrorDescription As String
[C++]HRESULT get_ErrorDescription(BSTR* pVal);
HRESULT put_ErrorDescription(BSTR Val);
Parameters
- pVal
Returns the value of the ErrorDescription property as a reference to a BSTR.- Val
Sets the value of the ErrorDescription property to the value of the BSTR.
Remarks
If the ErrorNumber Property is set to a negative value, the workflow engine looks for an error description in this property. If the ErrorNumber property is not set or is set to a value greater than or equal to zero, nothing happens.
Example
The following script causes the item transition to terminate. The workflow engine adds an entry to the audit trail with the error number and description. Assuming SendMail was previously defined, it sends a message back to the user that initiated the workflow with Please vote on the subject line.
If (WorkflowSession.ReceivedMessage.fields("VoteButton").Value = "") Then WorkflowSession.ErrorNumber = &H80004005 'Number returned to client WorkflowSession.ErrorDescription = "Form not completed." SendMail "Please vote" End If
Sub SendMail(MySubject) Set WFMsg = WorkflowSession.GetNewWorkflowMessage() With WFMsg .From = WorkflowSession.Sender .To = WorkflowSession.Sender .Subject = MySubject .TextBody = WorkflowSession.StateFrom & " -> " & WorkflowSession.StateTo .SendWorkflowMessage 0 'cdowfNoTracking End With End Sub
See Also
Send us your feedback about the Microsoft Exchange Server 2003 SDK.
Build: June 2007 (2007.618.1)
© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.