I recently wanted to always load two tabs when I open an account session. One for the account and one for the primary contact. Here is how I achieved this.
This involved;
- Create an action to navigate to the primary contact.
- Add the action to the load of the account hosted control.
Spoiler alert! – This approach works but it has a limitation. Described at end!!
Step One – Create action to navigate to the primary contact
Things to notice include;
- The order is 10, I wanted this action to come last in the BrowserDocumentComplete event.
- The hosted control is contact and the action is navigate.
- The url held in the data portion is below. Notice it includes replacement parameters containing the primary contact id.
- Also notice below that I added a condition, as I only want the action to execute if a primary contact is present.
url=main.aspx?etc=2&extraqs=&histKey=58360258&id=%7b[[Current Account.primarycontactid.id]u]%7d&newWindow=true&pagetype=entityrecord#550974523
Step Two – Add the action to the load of the account hosted control.
On the browserdocumentcomplete of the account, I added the newly created action.
The “Problem”!
This approach does work but I found an “issues” (although it might not be a problem for you!):
1. I have a number of windows navigation rules which I use to hide the navigation bar. I’ve done this as I wanted to restrict the navigation options available to users from within a session. None of these are triggered using this approach. I’m not 100% sure why. (This maybe a product bug or maybe a navigate action simply doesn’t trigger them.) If I find a solution I will update this post.
2. I did try to resolve the navigation issue by adding combinations of “Hidenav=True
and HideRibbon=True” to the data portion in the navigation action. I think these should have worked but did nothing, so another possible product bug.
You never know CRM2016 might resolve these issues!!!
Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk
Hi Neil,
Thanks for your blog! My #1 resource for USD 🙂
I came across the same issue with “hidenav=true” not working.
The solution is simple as the USD documentation is wrong here:
Just use “HideNavigationBar=true” (or “HideCommandBar” respectively).
This did the trick for me.
Cheers,
Joe
LikeLike
Great tip, thanks Joe
LikeLike