Share via


RetrieveByObjectWFProcess Message

banner art

Retrieves all workflow processes related to the specified entity.

The relevant classes are specified in the following table.

Type Class
Request RetrieveByObjectWFProcessRequest
Response RetrieveByObjectWFProcessResponse
Entity wfprocess

Remarks

To perform this action, the caller must have access rights on the workflow process instance (process instance) entity instance. For a list of required privileges, see RetrieveByObjectWFProcess Privileges.

Example

The following code example shows how to use the RetrieveByObjectWFProcess message.

[C#]
// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the target of the request.
TargetRetrieveWFProcess target = new TargetRetrieveWFProcess();
target.EntityId = new Guid("{304F0034-AC23-DA11-9508-0003FFD6517A}");

//Create the request.
RetrieveRequest request = new RetrieveRequest();
request.Target = target;
request.ColumnSet = new AllColumns();

// Retrieve the workflow process.
RetrieveResponse retrieved = (RetrieveResponse) service.Execute(request);

[Visual Basic .NET]
' Set up the CRM Service.
Dim service As New CrmService()
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create the target object of the request.
Dim target As TargetRetrieveWFProcess()
target.EntityId = new Guid("{304F0034-AC23-DA11-9508-0003FFD6517A}");

' Create the request.
Dim request as new RetrieveRequest()
request.Target = target;
request.ColumnSet = new AllColumns()

' Execute the request.
Dim retrieved As RetrieveResponse = CType(service.Execute(request), RetrieveResponse)

Related Topics

CrmService Messages

© 2007 Microsoft Corporation. All rights reserved.