In this post about Unified Service Desk for Microsoft Dynamics CRM I am going to talk about the “DoRoute” action.
The primary use of “DoRoute” is for debugging, so I will demonstrate this action being used from the debugger.
Calling this action forces your window navigation rules to be revaluated. Useful when debugging as you can “watch” what happens. In theory you could build this action into production code but I am unsure why! As the rules will be triggered automatically anyway. (Maybe it could have been useful for production if you could pick which rule to run but it doesn’t work like that, ALL rules are revaluated.)
DoRoute is always associated with you Global Manager.
If you try creating a “DoRoute” action on your Global Manager hosted control, the help will tell you the following.
Below you can see I have entered the name, entity and id parameters in the debugger. (FYI: I haven’t found a useful reason to enter frame, yet.)
- name=Search, “Search” is the name of the hosted control I want to simulate the entity being loaded from.
- id=<<an id>>, this is the GUID of the record you want to load. You can enter the actual GUID, as I did in my example or use a replacement parameter. E.g. [[lead.Id]]
- entity=lead, this is whatever entity you want to load. In my example a lead.
In the screen shot above, after entering the DoRoute action, I ran the action. Below action calls you can see the routing rule that was triggered. In my system it from one called “Lead from Search”, which resulted in a new session being started for the lead.
I hope you can see that being able to force the navigation rules from the debugger might be useful when testing.
Leave a comment