Greetings CRM’ers! Today we’re going to expand on a previous blog, Assign Owner and Route Case to Queue Using Workflow in Dynamics CRM.
In this scenario, we need to assign a team as the owner of a record and route to a queue based on an error code when validating an account upon creation. The team to assign as the owner and the queue will be determined by a configuration entity.
Using a Dynamics CRM custom workflow assembly, you can read from a configuration entity to determine the correct team and queue to route the Account record. This configuration entity can be dynamically modified without requiring an update to the CRM custom workflow assembly.
- You’ll want knowledge in writing and registering a Dynamics CRM custom workflow assembly. You can check out Dynamics CRM Custom Workflow Activities for detailed information.
- You’ll also need to know how to create a Dynamics CRM Workflow and use a CRM custom workflow assembly. Please visit Using Fetch XML in a custom workflow for detailed information.
- Create a new custom entity that has a many-to-one relationship to both Team and Queues.
- Add the desired combinations.
- The following custom workflow will fire when the Account is being created. If the validation fails, an error code will be determined. This error code will be used to pull the correct record from the Route entity to determine what Team to set as the owner and what Queue to forward the record to.
Using the AssignRequest message we will assign the invalid Account record to the Team. Using the AddToQueueRequest message we will route the invalid Account record to the Queue.
There you have it! A Microsoft Dynamics CRM custom workflow that can dynamically assign and route an invalid record.