Moves an entity instance from a queue to the In Progress (WIPBin) queue of the user.
//# The following code example demonstrates how to use the Handle message.
// 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://: /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);
No comments:
Post a Comment