Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Using PickFromQueue in Dynamics CRM - Sample Code
WhatsApp
Mahender Pal
8y
12.2k
0
0
100
Article
I saw one question in the
CRM community
forum today where a user was looking for help to use PickFromQueue message, so I thought of writing sample code for the same, so that it can help others as well. Let’s first understand the message and why we need it. As the name suggests this message is used to pick items from queue and used to assign to some user, so it’s basically the queue item routing, which we can do using Route button after selecting queue item like the following.
We can use this request when we want to handle this functionality from the code using a custom application or maybe let’s say we are developing case management portal or similar portal. To use this request we can use below three properties:
We can get full properties details from
here
.
And here is the code to use this request:
try
{
IOrganizationService organizationService= GetCRMService();
//Setup request
PickFromQueueRequest request =
new
PickFromQueueRequest();
request.QueueItemId =
new
Guid(
"GUID of the queueitem"
);
request.RemoveQueueItem =
true
;
request.WorkerId =
new
Guid(
"GUID of the user whom we want to assign"
);
organizationService.Execute(request);
}
catch
(FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault> ex)
{
Console.WriteLine(ex.Detail.Message);
}
Stay tuned for more sample code.
Read more articles on
Dynamics CRM:
Setup Online Microsoft Dynamics CRM And Create Contact Using Web Service
Dynamic CRM Operations With Your ASP.NET Application
Dynamics CRM
PickFromQueue
Up Next
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
HIMBAP
We are expert in Microsoft Power Platform.
Membership not found