This article shows how to add a record from one queue to another.
AddToQueueRequest routeRequest = new AddToQueueRequest
{
SourceQueueId = queueId.Id,
Target = new EntityReference(obj.LogicalName, obj.Id),
DestinationQueueId = userQueueId
};
orgService.Execute(routeRequest);
Sample Code
using Microsoft.Xrm.Sdk;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Crm.Sdk.Messages;
using System.ServiceModel.Description;
using System.Net;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Sdk.Metadata.Query;
using Microsoft.Xrm.Sdk.Messages;
using Microsoft.Xrm.Sdk.Metadata;
namespace CRMCodeHelper
{
class Program
{
private static IOrganizationService service = null;
static void Main(string[] args)
{
service = ConnectToCRM();
Guid sourceQueueId = new Guid(\"9b2296-bacb-e811-a962-000d3ab4998c\");
Guid destinationQueueId = new Guid(\"4f7cd6-54c5-e811-a95d-000d3ab49476\");
EntityReference Target =
new EntityReference(\"phonecall\",new Guid(\"8d408d-c255-4587-9e34-596d496e6738\"));
MoveQueueItem(sourceQueueId, destinationQueueId, Target);
}
public static IOrganizationService ConnectToCRM()
{
IOrganizationService organizationService = null;
try
{
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = \"\";
clientCredentials.UserName.Password = \"\";
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
organizationService =
new OrganizationServiceProxy(new Uri(\"\"), null, clientCredentials, null);
return organizationService;
}
catch (Exception ex)
{
Console.WriteLine(\"Exception caught - \" + ex.Message);
return organizationService;
}
}
public static void MoveQueueItem(Guid SourceQueueGuId, Guid DestinationQueueGuid, EntityReference ItemToMove)
{
AddToQueueRequest routeRequest = new AddToQueueRequest
{
SourceQueueId = SourceQueueGuId,
Target = ItemToMove,
DestinationQueueId = DestinationQueueGuid
};
service.Execute(routeRequest);
}
}
}
I was searching for this topic for a while. Now I'm glad that I came across this blog. Keep us updated with more such informative posts. Microsoft Dynamics CRM Training in Chennai Microsoft Dynamics CRM Training institutes in Chennai Oracle Training in Chennai Oracle Training institute in chennai Tally Course in Chennai Tally Training in Chennai Microsoft Dynamics CRM Training in Velachery Microsoft Dynamics CRM Training in Porur
LikeLike
information was very clear. Thank you for sharing.Microsoft Dynamics AX Online Training
LikeLike
what is fantastic post? this is so chock full of useful information I cannot wait to dig deep and start utilizing the resource give me.your exuberance is refreshing.Software Development Travel portal development Travel white label Travel Portal Solution B2C Travel Portal B2B Travel Portal Flight Booking API System Flight api integration
LikeLike
Your information was very clear. Thank you for sharing.D365 Finance and Operations Online Training
LikeLike
IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents. IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. corporate training in chennai corporate training in chennai corporate training companies in india corporate training companies in india corporate training companies in chennai corporate training companies in chennai I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai Project Centers in Chennai
LikeLike
Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.
LikeLike