web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to create Incident using C# and Route in dynamic CRM

(0) ShareShare
ReportReport
Posted on by

Good Day all,

  I am trying to create an incident record using c# from InfoPath form , which am able to accomplish but when this record is created in CRM it does not route automatically according to the routing set rule on CRM . Please how can I accomplish this from the C# code or CRM SDK . I know there are ways to manually input the routing rule in C# but I have over two hundred rules and it can be inserted in the code . 

Kindly assist

thanks

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    You can use an ApplyRoutingRuleRequest

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You should use ApplyRoutingRuleRequest/ApplyRoutingRuleResponse - msdn.microsoft.com/.../microsoft.crm.sdk.messages.applyroutingrulerequest.aspx to route your incident.

  • Community Member Profile Picture
    on at

    @a33ik Can you help me with a sample code for ApplyRoutingRuleRequest/ApplyRoutingRuleResponse to route what i can lay my hands on is using ApplyRoutingRuleRequest/ApplyRoutingRuleResponse to change queues .

    Thanks

  • Community Member Profile Picture
    on at

    Can you help me with a sample code for ApplyRoutingRuleRequest/ApplyRoutingRuleResponse to route what i can lay my hands on is using ApplyRoutingRuleRequest/ApplyRoutingRuleResponse to change queues .

    Thanks

  • Community Member Profile Picture
    on at

    Can you help me with a sample code for ApplyRoutingRuleRequest/ApplyRoutingRuleResponse to route what i can lay my hands on is using ApplyRoutingRuleRequest/ApplyRoutingRuleResponse to change queues .

    Thanks

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Try to use following:

               var request = new ApplyRoutingRuleRequest()

               {

                   Target = new EntityReference("incident", Guid.Empty)

               };

               service.Execute(request);

    Of course you have to replace Guid.Empty with identifier of case to apply routing rules to.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans