Saturday, June 8, 2013

CRM 2011: shortcut from Dashboard in outlook client


I was recently on an assignment for a client where they use Outlook client for CRM 2011. First page any user hits when Outlook opens is the Dashboard is selected in outlook / Advanced Settings / open default.
It provides an overview of the activities assigned to the user, the team's overall task load and the opportunities being worked on.

It's messy if a user wants to create a new opportunity. You must first open the entity for opportunities, and then to create a new record.

A shortcut on dashboarded would do the trick.
Richard Knudson has created a blog post on the same subject.

http://www.dynamicscrmtrickbag.com/2011/11/20/crm2011-dialog-power-tips-run-a-dialog-from-a-dashboard/

This refers ClientGlobalContext.js.aspx. It is not necessary from a dashboard because top.window includes Xrm.
So here is my code for a resource file:


<html><head>
<script type="text/javascript">
        function safeNewWindow(url, title) {
        var x = window.top.Xrm;
        win = window.open(x.Page.context.getClientUrl() + url, "_blank", "height=600,width=800,model=yes");
        }
</script>

<meta charset="utf-8"></head>
<body><a onclick="safeNewWindow(&quot;/main.aspx?etc=3&amp;extraqs=%3fetc%3d3%26pagemode%3diframe%26preloadcache%3d1370596730722&amp;pagetype=entityrecord&quot;,&quot;&quot;)" href="#"><font face="Tahoma">Opret projektopgave</font> </a>
<p></p></body></html>


Enjoy!