Export (0) Print
Expand All
Expand Minimize

Handle Message (CrmService)

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Works for all deployment typesWorks online and offline

Moves an entity instance from a queue to the In Progress (WIPBin) queue of the user.

The relevant classes are specified in the following table.

TypeClass
RequestHandleRequest
ResponseHandleResponse
TargetTargetQueued
EntitySee below

The following table shows the entities and target classes for this message.

EntityTarget Class
appointmentTargetQueuedAppointment
campaignactivityTargetQueuedCampaignActivity
campaignresponseTargetQueuedCampaignResponse
DynamicEntityTargetQueuedDynamic
emailTargetQueuedEmail
faxTargetQueuedFax
incidentTargetQueuedIncident
letterTargetQueuedLetter
phonecallTargetQueuedPhoneCall
serviceappointmentTargetQueuedServiceAppointment
taskTargetQueuedTask

Remarks

To use this message, pass an instance of the HandleRequest class as the request parameter in the Execute method.

To perform this action, the caller must have access rights on the entity instance specified in the request class. For a list of required privileges, see Handle Privileges.

Example

The following code example demonstrates how to use the Handle message.

[C#]
// Set up the CRM service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0; 
token.OrganizationName = "AdventureWorksCycle";
 
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the Target Object for the Request
TargetQueuedAppointment target = new TargetQueuedAppointment();

// EntityId is the Guid of the appointment being handled
target.EntityId = new Guid("7B222F98-F48A-4AED-9D09-77A19CB6EE82");

// Create the Request Object
HandleRequest handle = new HandleRequest();

// Set the Request Object's Properties
handle.Target = target;

// SourceQueueId is the Guid of the queue the appointment is coming from
handle.SourceQueueId = sourceQueue;

// Execute the Request
HandleResponse handled = (HandleResponse) service.Execute(handle);

[Visual Basic .NET]
' Set up the CRM service.
Dim token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle";
 
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create the Target Object for the Request
Dim target As New TargetQueuedAppointment()

' EntityId is the Guid of the appointment being handled
target.EntityId = New Guid("7B222F98-F48A-4AED-9D09-77A19CB6EE82")

' Create the Request Object
Dim handle As New HandleRequest()

' Set the Request Object's Properties
handle.Target = target

' SourceQueueId is the Guid of the queue the appointment is coming from
handle.SourceQueueId = sourceQueue

' Execute the Request
Dim handled As HandleResponse = CType(service.Execute(handle), HandleResponse)

See Also

Concepts

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft