Adds the search and process job to the Microsoft Office SharePoint Server 2007 master timer job.
Assembly: Microsoft.Office.Policy (in Microsoft.Office.Policy.dll)
'Declaration <PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _ <PermissionSetAttribute(SecurityAction.LinkDemand, Name := "FullTrust")> _ Public Function Add ( _ web As SPWeb, _ schedule As DateTime, _ gParentId As Guid, _ nItemId As Integer, _ fRememberWebId As Boolean, _ gItemGuid As Guid, _ gBatchId As Guid, _ nUserId As Integer _ ) As Guid 'Usage Dim instance As SearchAndProcessItem Dim web As SPWeb Dim schedule As DateTime Dim gParentId As Guid Dim nItemId As Integer Dim fRememberWebId As Boolean Dim gItemGuid As Guid Dim gBatchId As Guid Dim nUserId As Integer Dim returnValue As Guid returnValue = instance.Add(web, schedule, _ gParentId, nItemId, fRememberWebId, _ gItemGuid, gBatchId, nUserId)
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")] [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")] public Guid Add( SPWeb web, DateTime schedule, Guid gParentId, int nItemId, bool fRememberWebId, Guid gItemGuid, Guid gBatchId, int nUserId )
The site on which the search and process operation is to be run.
The date and time when you want the search and process operation to run.
A GUID that identifies the parent of the work item.
A 32-bit integer that identifies a list item associated with the work item.
true to set the web identifier; otherwise, false.
A GUID that specifies a list item associated with the work item. Might return a null reference (Nothing in Visual Basic) if the work item was created without an SPListItemID (for example, an alerts work item).
A GUID that specifies a context identifier to the job work item engine. The value can vary depending on the job type; for example, for alerts it may store a user ID but for workflow it would store a workflow ID.
The user on whose behalf the search and process operation is being performed.
A GUID that represents the GUID of the timer job created for this request.
The Add method throws an exception if any of the following occurs:
The referenced assembly cannot be found, or does not implement the IProcess interface.
The time you have specified for the job to run is invalid. For example, you have specified a time in the past.
The search and process operation is created as a one-time, asynchronous timer job.
The nUserId parameter enables you to specify the user on whose behalf the search and process operation is being performed. Items to which the user does not have sufficient rights are not included in the return set of the search and process operations.