SPWorkflow.CreateHistoryEvent Method (Int32, Object, SPMember, String, String, String)
Writes a workflow history event to the specified workflow history list.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Sub CreateHistoryEvent ( _
eventId As Integer, _
groupId As Object, _
user As SPMember, _
outcome As String, _
description As String, _
otherData As String _
)
'Usage
Dim instance As SPWorkflow
Dim eventId As Integer
Dim groupId As Object
Dim user As SPMember
Dim outcome As String
Dim description As String
Dim otherData As String
instance.CreateHistoryEvent(eventId, _
groupId, user, outcome, description, _
otherData)
public void CreateHistoryEvent(
int eventId,
Object groupId,
SPMember user,
string outcome,
string description,
string otherData
)
Parameters
eventId
Type: System.Int32The type of workflow event.
groupId
Type: System.ObjectThe ID of the group to which this workflow history event belongs.
user
Type: Microsoft.SharePoint.SPMemberThe user who is responsible for the workflow history event.
outcome
Type: System.StringA description of the workflow event, limited to 255 characters. This information is displayed on the workflow status page.
description
Type: System.StringA longer description of the workflow event. This information is displayed on the workflow status page.
otherData
Type: System.StringAny other data to be captured about the workflow history event. This information is not displayed on the workflow status page.
Exceptions
Exception | Condition |
---|---|
ArgumentException | groupId is not an int. |
Remarks
The eventId parameter takes an enumerated type, based on the SPWorkflowHistoryEventType enumeration.
See Also
Reference
Microsoft.SharePoint.Workflow Namespace
Other Resources
Workflows in SharePoint Foundation