Export (0) Print
Expand All

SPSite.AddWorkItem method (Guid, DateTime, Guid, Guid, Guid, Int32, Boolean, Guid, Guid, Int32, Byte[], String, Guid, Boolean)

Adds a work item to the site collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public Guid AddWorkItem(
	Guid gWorkItemId,
	DateTime schdDateTime,
	Guid gWorkItemType,
	Guid gWebId,
	Guid gParentId,
	int nItemId,
	bool fSetWebId,
	Guid gItemGuid,
	Guid gBatchId,
	int nUserId,
	byte[] rgbBinaryPayload,
	string strTextPayload,
	Guid gProcessingId,
	bool useExponentialRetryBackOff
)

Parameters

gWorkItemId
Type: System.Guid

A GUID that identifies the work item.

schdDateTime
Type: System.DateTime

A System.DateTime object that represents the date and time at which the work item takes place.

gWorkItemType
Type: System.Guid

A GUID that specifies the work item type.

gWebId
Type: System.Guid

A GUID that specifies the Web site that is associated with the work item.

gParentId
Type: System.Guid

A GUID that identifies the parent of the work item.

nItemId
Type: System.Int32

A 32-bit integer that identifies a list item that is associated with the work item.

fSetWebId
Type: System.Boolean

true to set the Web identifier; otherwise, false.

gItemGuid
Type: System.Guid

A GUID that specifies a list item that is associated with the work item.

gBatchId
Type: System.Guid

A GUID that specifies a context identifier for the job work item engine. The value can vary depending on the job type; for example, for alerts it might store a user ID but for workflow it would store a workflow ID.

nUserId
Type: System.Int32

A 32-bit integer index that identifies an SPUser object that represents the user who is responsible for scheduling the work item.

rgbBinaryPayload
Type: []

A byte array that specifies a binary payload.

strTextPayload
Type: System.String

A string that specifies a text payload.

gProcessingId
Type: System.Guid

A GUID that identifies the processing of the work item.

useExponentialRetryBackOff
Type: System.Boolean

true to use exponential back-off; otherwise, false.

Return value

Type: System.Guid
A GUID that identifies the work item.

The work item that is created through the AddWorkItem method is a schedule-job work item; its information can be accessed through the SPWorkItem class.

Show:
© 2014 Microsoft