<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Richard Knudson&#039;s Dynamics CRM Trick Bag &#187; Customization</title>
	<atom:link href="http://www.dynamicscrmtrickbag.com/category/customization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dynamicscrmtrickbag.com</link>
	<description>Building business value on Dynamics CRM</description>
	<lastBuildDate>Fri, 27 Jan 2012 14:42:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using JScript to Link Records in an N:N Relationship</title>
		<link>http://www.dynamicscrmtrickbag.com/2012/01/19/using-jscript-to-link-records-in-an-nn-relationship/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2012/01/19/using-jscript-to-link-records-in-an-nn-relationship/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 02:55:31 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Form Script]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2012/01/19/using-jscript-to-link-records-in-an-nn-relationship/</guid>
		<description><![CDATA[January 19, 2012 – I get lots of Dynamics CRM questions in my inbox, but rarely as well-articulated as one I received today. A question does not have to be polished to deserve an answer, but if you want it to turn, unedited, into an article, it helps. Forthwith, January's Dynamics CRM Trick Bag Stump the Experts question, regarding how to use JScript to link records in an N:N relationship.]]></description>
			<content:encoded><![CDATA[<p>January 19, 2012 – I get lots of Dynamics CRM questions in my inbox, but rarely as well-articulated as one I received today. A question does not have to be polished to deserve an answer, but if you want it to turn, unedited, into an article, it helps. Forthwith, January&#8217;s Dynamics CRM Trick Bag &#8220;Stump the Experts&#8221; question. Calling it &#8220;Stump the Experts&#8221; makes me feel better, since I couldn&#8217;t answer it. But I&#8217;m betting that more than a few of you can, so please weigh in, in the form of comments on this post, with advice on how to programmatically link records in an N:N relationship.
</p>
<p>Here&#8217;s the note I received:
</p>
<p style="margin-left: 36pt">Hi Richard,
</p>
<p style="margin-left: 36pt">I heard you speak at Extreme last year. I have been stumped on something and was wondering if you had time to help a noob with a weird problem. Maybe make a blog post out of it? I apologize if this is not the right way to beg for help.
</p>
<p style="margin-left: 36pt">We have a custom entity called a Project, from which multiple Marketing Lists hang off of it. Using javascript triggered from the Project, we want to be able to create marketing lists and associate the new marketing list with the Project. I can&#8217;t seem to figure out how to associate it with the Project. I can make the Marketing List, fill in the all the correct information, but am failing at the association with the project.
</p>
<p style="margin-left: 36pt">I tried using some code from here:
</p>
<p style="margin-left: 36pt"><a href="http://stackoverflow.com/questions/7358482/how-to-link-two-records-with-javascript-and-a-nm-relationship">http://stackoverflow.com/questions/7358482/how-to-link-two-records-with-javascript-and-a-nm-relationship</a>
	</p>
<p style="margin-left: 36pt">to use this call:
</p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">AssociateEntities(data.ListId, &#8220;ListSet&#8221;, Xrm.Page.data.entity.getId(), &#8220;ags_projectSet&#8221;);</p>
<p></span></p>
<p style="margin-left: 36pt">Am I passing the IDs incorrectly? Not sure. Is this code sensitive to there being curly brackets around the IDs? For the xml, how do you know which object to put first? Is this the wrong piece of code since I am trying to fill in a 1:N relationship instead of N:M? Any help you can give me would be awesome. Thanks.
</p>
<p style="margin-left: 36pt">on this function:
</p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">function AssociateEntities(id1, entityType1, id2, entityType2, relationshipName) {</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    var xml;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    var resultXml;</p>
<p></span></p>
<p style="margin-left: 36pt">
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xml = &#8220;&lt;Execute xmlns=&#8217;http://schemas.microsoft.com/crm/2007/WebServices&#8217;&gt;&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xml += &#8220;&lt;Request xsi:type=&#8217;AssociateEntitiesRequest&#8217;&gt;&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xml += &#8220;&lt;Moniker1&gt;&lt;Id xmlns=&#8217;http://schemas.microsoft.com/crm/2006/CoreTypes&#8217;&gt;&#8221; + id1 + &#8220;&lt;/Id&gt;&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xml += &#8220;&lt;Name xmlns=&#8217;http://schemas.microsoft.com/crm/2006/CoreTypes&#8217;&gt;&#8221; + entityType1 + &#8220;&lt;/Name&gt;&lt;/Moniker1&gt;&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xml += &#8220;&lt;Moniker2&gt;&lt;Id xmlns=&#8217;http://schemas.microsoft.com/crm/2006/CoreTypes&#8217;&gt;&#8221; + id2 + &#8220;&lt;/Id&gt;&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xml += &#8220;&lt;Name xmlns=&#8217;http://schemas.microsoft.com/crm/2006/CoreTypes&#8217;&gt;&#8221; + entityType2 + &#8220;&lt;/Name&gt;&lt;/Moniker2&gt;&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xml += &#8220;&lt;RelationshipName&gt;&#8221; + relationshipName + &#8220;&lt;/RelationshipName&gt;&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xml += &#8220;&lt;/Request&gt;&lt;/Execute&gt;&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt">
<p style="margin-left: 36pt">
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    var xHReq = new ActiveXObject(&#8221;Msxml2.XMLHTTP&#8221;);</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xHReq.Open(&#8221;POST&#8221;, &#8220;/mscrmservices/2007/CrmService.asmx&#8221;, false);</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xHReq.setRequestHeader(&#8221;SOAPAction&#8221;,&#8221;<a href="http://schemas.microsoft.com/crm/2007/WebServices/Execute">http://schemas.microsoft.com/crm/2007/WebServices/Execute</a>&#8220;);</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xHReq.setRequestHeader(&#8221;Content-Type&#8221;, &#8220;text/xml; charset=utf-8&#8243;);</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xHReq.setRequestHeader(&#8221;Content-Length&#8221;, xml.length);</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    xHReq.send(xml);</p>
<p></span></p>
<p style="margin-left: 36pt">
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    resultXml = xHReq.responseXML;</p>
<p></span></p>
<p style="margin-left: 36pt">
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    if (resultXml) {</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">        return &#8220;success&#8221;;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    }</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    else {</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">        return null;</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">    }</p>
<p></span></p>
<p style="margin-left: 36pt"><span style="font-family:Courier New; font-size:8pt">}</p>
<p></span></p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2012/01/19/using-jscript-to-link-records-in-an-nn-relationship/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tracking and Scoring User Activity</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/12/13/tracking-and-scoring-user-activity/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/12/13/tracking-and-scoring-user-activity/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 00:30:35 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011 Business Process Book]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Dynamics CRM Workflows]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/12/13/tracking-and-scoring-user-activity/</guid>
		<description><![CDATA[December 14, 2011 - Everybody agrees that user adoption is a good thing, and that high user adoption is a key measure of the overall success of a CRM implementation. But how can you measure "user adoption?" This article describes a simple approach, combining a couple of customizations and a few workflows, to come up with a single metric by which users can be ranked. And for best results, don't tell your users you're measuring their activity!]]></description>
			<content:encoded><![CDATA[<div>Everybody agrees that user adoption is a good thing, and that high user adoption is a key measure of the overall success of a CRM implementation. But there&#8217;s less agreement on how to <em>measure</em> user adoption. One way is to use a dashboard to directly display measures of &#8220;what users are doing&#8221;. For example, suppose you&#8217;re interested in tracking how many records are created, over time and by user, for several key record types, such as accounts, contacts, and opportunities, and examine the following figure:</div>
<div><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121411_0029_Trackingand1.png" alt="" /></div>
<div>This dashboard displays a set of time series charts in the first row, of total records created over the last six months for accounts, contacts and opportunities. In the second row, a corresponding chart for each record type shows the distribution of the same records across their owning users.</div>
<div>Dashboards like this can of course be created for any record type – activities, cases, leads, custom entities – and can provide a good high level view of &#8220;who&#8217;s doing what.&#8221; But although visualizations like this are a good start, they don&#8217;t go far enough in several ways. For example:</div>
<ul>
<li>They provide visualization, but they don&#8217;t really provide a <em>measure</em>.</li>
<li>They don&#8217;t scale very well. For example, if you need to measure and compare usage for dozens or more users, they won&#8217;t be very effective.</li>
</ul>
<div>However, you could <em>score</em> various user activities, assigning a certain number of points for different kinds of activities. For example, consider the following table:</div>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width: 217px;"></col>
<col style="width: 132px;"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Activity</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Score</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">Completed Appointment</span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">Completed Phone Call</span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">New Contact </span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">5</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">New Account</span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">5</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">New Opportunity</span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">5</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">Won Opportunity</span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">10</td>
</tr>
</tbody>
</table>
</div>
<div>Obviously the scheme you use to score users&#8217; activities will differ for every business, but something like this one accords with common business requirements as well as with the way Dynamics CRM is intended to be used:</div>
<ul>
<li>For activity records, it&#8217;s completed ones that matter. Canceled ones don&#8217;t count.</li>
<li>Contacts and accounts – the customer records – are worth more than a completed activity.</li>
<li>And while opportunities are worth something to create, they&#8217;re worth even more to close as won!</li>
</ul>
<div>Tracking and scoring user activity can be accomplished by combining several customizations and workflows, and an example of this is presented next. The end-goal is a dashboard like the one in the following figure:</div>
<div><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121411_0029_Trackingand2.png" alt="" /></div>
<div>The key concept is that a single all-up score is tracked for each user. This is displayed in the <strong>Activity Score Leaders</strong> chart in the top row. The first two charts in the top row break out users&#8217; scores by activity type, for different time periods: today and the last 30 days. The grid shown underneath the charts is a custom entity, here playing the role of a reminder to users, so they know how different activities are scored.</div>
<h2>Setting Up</h2>
<div>There are two main customizations required for the user activity scoring approach described here:</div>
<ul>
<li>A single custom field is added to the user entity to maintain an all-up &#8220;total score&#8221; value.</li>
<li>And because it might be important to report on a user&#8217;s score over different time periods, I use a custom entity – Activity Counter Records – to store the detail on every activity contributing to the overall score.</li>
</ul>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width: 142px;"></col>
<col style="width: 142px;"></col>
<col style="width: 354px;"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Entity</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Custom Fields</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Field Type and Purpose</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt" rowspan="4"><span style="color:white"><strong>Activity Counter (custom)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Name</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Single Line of Text.</strong> Name of record</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Record Type</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Single Line of Text</strong>. Account, contact, appointment, etc.</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Event</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Single Line of Text</strong>. Create, Complete, Won, etc.</p>
<div>Creates a custom 1:N relationship from User to SLA</div>
</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Score</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Whole Number</strong>. Tracks score for each activity</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">User</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Lookup to User. </strong>Associates each record with the user performing the activity. You can use the system Owner field for this, or create a custom lookup field. In the approach described here a custom lookup field is used.</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>User</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Activity Counter Aggregate Score</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Whole Number.</strong> This field stores the all-up &#8220;aggregate&#8221; score for each user.</td>
</tr>
</tbody>
</table>
</div>
<h2>How it Works</h2>
<div>To focus on the essentials, let&#8217;s implement a simple version of user activity scoring according to these rules:</div>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width: 217px;"></col>
<col style="width: 132px;"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Activity</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Score</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">Completed Appointment</span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">New Contact </span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">5</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">New Opportunity</span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">5</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white">Won Opportunity</span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">10</td>
</tr>
</tbody>
</table>
</div>
<div>One workflow will be used for each of these activities, and it will perform the following actions:</div>
<ul>
<li>Create an activity counter record with the appropriate values, and associate it with the user performing the activity being scored.</li>
<li>Update the aggregate score field on the user&#8217;s record.</li>
</ul>
<div>Here are the four workflows as they appear in the process grid:</div>
<div><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121411_0029_Trackingand3.png" alt="" /></div>
<div>The following three figures illustrate the workflow that performs the scoring for the completed appointment activity. First, the following figure shows the workflow properties and overall structure:</div>
<div><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121411_0029_Trackingand4.png" alt="" /></div>
<div>It&#8217;s triggered by <strong>Record status changes</strong>, and the first <strong>If</strong> condition checks the status, only proceeding if the appointment is completed. I wrote this to also perform a check on whether the <strong>Regarding</strong> field contains data. This illustrates a possible requirement that only certain kinds of appointments get scored, such as those associated with account or contact records, etc.</div>
<div>The first action performed by the workflow is to create an activity counter record:</div>
<div><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121411_0029_Trackingand5.png" alt="" /></div>
<div>The most important point to note here is that the only way an activity counter record gets created is via these workflows. So in this approach, every (or almost every) field will get filled in automatically, behind the scenes. Records like these are not intended to be created interactively by a user! This accounts for why we can use simple text fields for things like <strong>Record Type</strong> and <strong>Event</strong>: since they&#8217;re always filled by the workflow, they&#8217;ll always be entered correctly.</div>
<div>Also, notice that the <strong>Score</strong> field is simply set to a fixed value, in this case 2.</div>
<div>The activity counter record is associated with the user with dynamic values on the custom User lookup field. In this example I filled both the <strong>Owner</strong> and custom <strong>User</strong> field, although that&#8217;s not really required.</div>
<div>The next step is to update the aggregate score field on the user record:</div>
<div><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121411_0029_Trackingand6.png" alt="" /></div>
<div>Here, the most important difference is the use of the <strong>Increment by</strong> operator: that&#8217;s how we get a convenient single all-up activity score stored on the user record.</div>
<div>The logic of the other three workflows is essentially the same. Here are a few things to think about and variations you might try:</div>
<ul>
<li>
<div>If all you need to do is track an aggregate score for each user, you don&#8217;t need the custom entity I used (activity counter). But remember, if you don&#8217;t have that you lose the time dimension along with activity details. For example, the following figure shows a specific user&#8217;s activity counter records from the context of the user form, one of which you&#8217;d have without the custom entity:</div>
<div><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121411_0029_Trackingand7.png" alt="" /></div>
</li>
<li>
<div>Notice that the scoring logic in this approach is embedded in the workflow processes. In that sense it&#8217;s a little bit &#8220;hardwired&#8221;. With a little more work, you could create the ability for a user to configure settings for scoring, so that if you needed to change the score a user receives for an activity, you could update a record rather than the workflow process itself. One way to do this would be to create another custom entity, such as <strong>Activity Counter Settings</strong>, and have each activity counter record be a child record of a specific settings record. If you take another look at the way I created the activity counter record you&#8217;ll see a clue about how this approach can work:</div>
<div><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121411_0029_Trackingand8.png" alt="" /></div>
<div>The <strong>Counter Setting</strong> field is a lookup, which if filled in will associate a counter record with a parent setting record. If you took this approach, then the Score field could be filled with dynamic values rather than directly as in this approach.</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/12/13/tracking-and-scoring-user-activity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Round-Robin Record Assignment with CRM 2011 Dialog Processes</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/12/11/round-robin-record-assignment-with-crm-2011-dialog-processes/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/12/11/round-robin-record-assignment-with-crm-2011-dialog-processes/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 19:26:13 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011 Business Process Book]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Dynamics CRM Workflows]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/12/11/round-robin-record-assignment-with-crm-2011-dialog-processes/</guid>
		<description><![CDATA[December 12, 2011 - The Dynamics CRM literature is replete with articles about round-robin schemes to assign records. It turns out to be easier to implement processes like this with dialogs than with workflows, because a dialog process can extend its data context as it runs. Here's an example. Enjoy!]]></description>
			<content:encoded><![CDATA[<h2>Round-Robin Processes</h2>
<p>There are many flavors of round-robin record assignment processes, but they all share some fundamental properties. The most important is that they all implement what you might refer to as an &#8220;egalitarian&#8221; record assignment process. For example, records are assigned first to sales rep 1, then to sales rep 2, and so on until sales rep N gets her assignment, then the process starts over again with sales rep 1 next in line.</p>
<p>We&#8217;ll examine a dialog process version of this here, but since we&#8217;re on the topic it might be worth characterizing several different assignment processes, all of which could be implemented with workflows or dialogs in Dynamics CRM:</p>
<ul>
<li>If you create an opportunity record, you own it. Call this the &#8220;chew your own meat&#8221; school of record assignment.</li>
<li>If an opportunity is created for a customer you own, you get the opportunity. This is the strong version of the owned-account school of record assignment.</li>
<li>If an opportunity is created for an industry or product in which you have expertise, it gets assigned to you. Call this the strong version of the industry expertise school.</li>
</ul>
<p>Many organizations combine several different styles of record assignment, within or across business units. For example, you might use a strong owned-account assignment approach for opportunities created for owned accounts, but have a set of accounts designated as &#8220;house accounts&#8221;, and assign opportunities for those accounts on a round-robin basis.</p>
<p>Or if you&#8217;re a mortgage banker, you might assign loan modifications on a round-robin basis. Since load modifications don&#8217;t have new money associated with them, you might put them in the take-one-for-the-team category and distribute them equally to a pool of loan modification processers.</p>
<h2>Workflows v. Dialogs for Round-Robin Assignment</h2>
<p>Remember our <a href="http://www.dynamicscrmtrickbag.com/2011/11/30/crm-2011-dialogs-should-you-use-query-crm-data-or-lookup/">discussion comparing the data context of workflow and dialog processes</a>. One implication of that discussion is that round-robin processes are much easier to implement with dialog processes than with workflows. This is because a running instance of a workflow doesn&#8217;t have any way of knowing anything about other instances, and thus doesn&#8217;t know anything about previous record assignments. The standard way of getting around this in a workflow is to create a custom entity that functions as the parent record of every opportunity needing to be assigned. (For example, Ben Vollmer wrote the first <a href="http://blogs.msdn.com/b/crm/archive/2009/02/10/microsoft-dynamics-crm-round-robin-lead-assignment.aspx">article on this topic</a>.)</p>
<p>The workflow can then both query the parent record for things like which user got the last assignment, as well as update it with who&#8217;s getting the current assignment. As you will see here, this kind of workaround in unnecessary for dialogs, since they can create their own data context as they run.</p>
<p>The scenario for this example is as follows:</p>
<ol>
<li>A user selects a specific opportunity record and starts the dialog process.</li>
<li>The dialog builds a query of &#8220;participating users&#8221;: that is, users designated as participating in the round-robin process.</li>
<li>The query will be in ascending date order by the date each participating user was last assigned an opportunity by the process.</li>
<li>The user will be instructed to select the user at the top of the list, but can depart from the &#8220;last-in first-out&#8221; rule if necessary.</li>
<li>After the user is selected, the dialog assigns the record and performs some other data updates.</li>
</ol>
<h2>Setting Up</h2>
<p>This dialog requires customizations to the User entity: a check-box field to specify participating users, and a date field to keep track of the last assignment date:</p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width: 140px;"></col>
<col style="width: 145px;"></col>
<col style="width: 353px;"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt" colspan="2"><span style="color:white"><strong>Entity</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Customizations</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Field Type and Purpose</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt" colspan="2" rowspan="2"><span style="color:white"><strong>User</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Field: Participates in Round-Robin Process</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Two Options.</strong> Specifies a user&#8217;s participation in process.</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Field: Last Assignment Date</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Date and Time</strong>. Date of last assignment as part of process.</td>
</tr>
</tbody>
</table>
</div>
<p>The following figure shows how these fields could be placed on a user form:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121111_1925_RoundRobinR1.png" alt="" /></p>
<p>Of course in a production environment you don&#8217;t want any old user going in and changing these things, so you&#8217;d need to come up with an approach for making sure that the only users who can change them are the ones that are supposed to be able to.</p>
<h2>How it Works</h2>
<p>For this example, let&#8217;s start by examining the user experience. To keep it simple, I&#8217;ll start from the opportunity data grid, but in a production environment you might start from a queue for unassigned opportunities, and lock down the queue so that only certain users can kick off the process. The following figure shows how it looks as a user runs the process: a single opportunity record is selected on the grid, and the dialog prompts to select the user to whom the record should be assigned:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121111_1925_RoundRobinR2.png" alt="" /></p>
<p>The two most important things to notice about this are as follows:</p>
<ul>
<li>Only a subset of users are available for selection. You&#8217;ll see how the query uses the <strong>Participates in Round Robin Process</strong> field to filter out non-participating user records.</li>
<li>The list of participating users is presented in ascending order by the <strong>Last Assignment Date </strong>field. Essentially, this prompts the user to apply the last-in-first-out logic, but allows for out of order selection. The user is instructed to provide an explanation for any out of order assignments in the text field.</li>
</ul>
<p>Suppose I finish that dialog by selecting User A. The selected opportunity is removed from the My Opportunities view (unless I happen to be User A!) because the dialog process assigns it to that user. Now if I run it again, the experience is slightly different:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121111_1925_RoundRobinR3.png" alt="" /></p>
<p>Now User B percolates to the top of the list. As you&#8217;ll see next, this is because the dialog process updates the Last Assignment Date field so you&#8217;ll always have the ability to sort by that field.</p>
<ol>
<li>
<h4>Building the Dialog Process</h4>
<p>The dialog itself (name) is created for the Opportunity entity, and is available to run only on demand. The following figure shows the step editor for the dialog process. I&#8217;ve used stages to organize the process in the designer, in what is a very common configuration for a dialog process that uses a query:</p>
<ol>
<li><strong>Query.</strong> This stage contains the single Query step.</li>
<li><strong>Dialog UI.</strong> This stage presents the user experience; the first prompt uses the query to present the the list of participating users.</li>
<li><strong>Post-dialog Processing</strong>. After the user clicks Finish, the steps in this stage create records, assign them, update them as necessary and so forth.</li>
</ol>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121111_1925_RoundRobinR4.png" alt="" /></p>
<p>The next figure shows how to construct the Participating Users query. The single filter condition uses the custom field added to the user entity (<strong>Participates in Round Robin Process</strong>). To sort the query in ascending order by <strong>Last Assignment Date</strong>, click the Edit Columns button:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121111_1925_RoundRobinR5.png" alt="" /></p>
<p>The next figure shows how to construct the Prompt and Response using this query. I used the <strong>Prompt Text</strong> to instruct the user on what to do for out of order assignments, but if my advice got much longer than this, I&#8217;d probably use the <strong>Tip Text</strong> to give it a cleaner look. Also, notice how I constructed the Separator, using a semi-colon and some static text to make it more obvious what the date field refers to:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121111_1925_RoundRobinR6.png" alt="" /></p>
<p>The first step in stage 3 is pretty obvious: it assigns the selected record to the selected user. The second step is more interesting. This updates the <strong>Last Assignment Date</strong> field on the user record with the current time, so that next time you run the process the user with the most recent assignment goes to the bottom of the list:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/121111_1925_RoundRobinR7.png" alt="" /></p>
<p>Some time ago I made a video on this kind of a dialog process. You can see it, along with a few others, on the <a href="http://www.dynamicscrmtrickbag.com/trick-bag-video/">Trick Bag Video page</a>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/12/11/round-robin-record-assignment-with-crm-2011-dialog-processes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing One-to-Many Relationships</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/12/03/customizing-one-to-many-relationships/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/12/03/customizing-one-to-many-relationships/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 18:11:03 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Tips, Tricks, Q&A]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/12/03/customizing-one-to-many-relationships/</guid>
		<description><![CDATA[December 3, 2011 - One-to-Many (or 1:N) relationships are ubiquitous in Dynamics CRM. A reader's question prompted this article on how to customize the default behavior of 1:N relationships, such as what happens to child records when their parents are assigned, shared and the like. ]]></description>
			<content:encoded><![CDATA[<p>I recently received a question from Trick Bag reader Sara Hall, who asked the following question:
</p>
<p style="margin-left: 36pt"><span style="color:#2a3845; font-family:Arial; font-size:9pt">In my company&#8217;s structure we have both business units and security roles. I am not sure if the question I am going to ask pertains to either of these but I thought I should give it a shot. <em>When a person &#8220;shares&#8221; a parent record … let&#8217;s say an account with another individual inside or outside of their same business units does that mean all &#8220;child&#8221; records i.e. opportunities, contacts of that account are now visible to the person the account record was shared with?<br />
</em></span></p>
<p>Excellent question, Sara. I thought I must have written about that, so I searched the last two year&#8217;s worth of Trick Bag articles. I found lots of articles on many-to-many relationships, but not a single one on the more common one-to-many variety. So I thought I better write one.
</p>
<p>While there is a business unit/security roles component in the answer to your question, it really has more to do with customizing the default one-to-many relationships than it does with security roles.
</p>
<h2>Default One-to-Many Relationships<br />
</h2>
<p>Let&#8217;s start with how Dynamics CRM entity relationships work out of the box. I&#8217;ll use the account entity to illustrate, partly because it&#8217;s at the top of the relationship heap in CRM and has more child records than most other record types. For example, account has built-in 1:N relationships to contact, opportunity, email, task, appointment, and so forth. Generally speaking, the links you see in left navigation on a CRM form are entities the form entity has a 1:N relationship to.
</p>
<p>The default behavior of all of the system 1:N relationships is what&#8217;s known as <strong>Parental</strong>. This means that anything you do to a parent record cascades down to all child records. A good way to understand this is to examine the scary dialog you see when you try to delete an account record:
</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/120311_1810_Customizing1.png" alt=""/>
	</p>
<p>In the parlance of 1:N relationships, we say that deleting the parent record &#8220;cascades down&#8221; to child records. It turns out that the other things you might do to a parent record &#8212; such as assigning and sharing it – also cascade down to all child records. So there&#8217;s the specific answer to your question about sharing: unless somebody&#8217;s customized your Dynamics CRM, when a parent record is shared all of its child records are shared as well.
</p>
<h2>Customizing 1:N Relationships<br />
</h2>
<p>But that parental behavior can be customized. For example, if you open up the solution explorer (i.e., start customizing!) and drill down into the Account entity, you can click the 1:N Relationships tab and see something like the following figure:
</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/120311_1810_Customizing2.png" alt=""/>
	</p>
<p>I say &#8220;something like&#8221; since this is customized and might look a little different from yours. In particular, notice that in the figure the Contact and Opportunity relationships are set to <strong>Configurable Cascading</strong>. These are customized, away from their default Parental behavior. You can customize these by double-clicking on one of the rows to open its Relationship Definition dialog. The following figure shows what this looks like for the Account -&gt; Contact 1:N relationship in my example:
</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/120311_1810_Customizing3.png" alt=""/>
	</p>
<p>Notice that the <strong>Type of Behavior</strong> is set to <strong>Configurable Cascading</strong>, and <strong>Share</strong> is set to <strong>Cascade None</strong>. That&#8217;s how I configured the relationship for opportunity as well. So in this scenario, if I shared an account record with another user, here&#8217;s what would happen:
</p>
<ul>
<li>Appointments, tasks, e-mails would all be shared
</li>
<li>Contacts and opportunities would not be shared
</li>
</ul>
<p>This specific customization could account for child records not being shared along with the parent, which was one of the issues reported by Sara&#8217;s users.
</p>
<p>There are four options in these &#8220;cascade&#8221; drop-downs:
</p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width:233px"/>
<col style="width:366px"/></colgroup>
<tbody valign="top">
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<p>Cascade All</p>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<p>The default</p>
</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<p>Cascade Active</p>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<p>Only cascade for active records (e.g., don&#8217;t reassign closed opportunities!)</p>
</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<p>Cascade User-Owned</p>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<p>Only cascade for child records owned by the same user as the parent</p>
</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<p>Cascade None</p>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<p>Don&#8217;t cascade anything</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>When you make changes like this, after you publish customizations they take effect, so it&#8217;s a good idea not to do this in a production environment unless you&#8217;ve thoroughly tested first.
</p>
<p>So that&#8217;s how you customize the behavior of the default 1:N relationships. And just remember it&#8217;s the relationships that are referred to as Parental that are the ones you want to customize. There are plenty of relationships that are described as <strong>System</strong> (I didn&#8217;t show any of these in the example above, but they&#8217;re there!), and the system relationships cannot be customized.
</p>
<h2>Sharing and Security Roles<br />
</h2>
<p>What this has to do with security roles is that <strong>Share</strong> is a security privilege. The default security roles have pretty generous sharing privileges, as you can see from the following figure. Salesperson is one of the least generous security roles and even it has organization level sharing privilege.
</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/12/120311_1810_Customizing4.png" alt=""/>
	</p>
<p>You could customize this, for example by dialing the Share privilege on Account down to User-level (a yellow quarter pie-piece, obviously <span style="font-family:Wingdings">J</span> ), and then users would only be able to share records they owned. But if they could share a record, the cascading behavior is determined by the customizable behavior of the 1:N relationship.
</p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/12/03/customizing-one-to-many-relationships/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dialog Power Tips: Run a Dialog from a Dashboard</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/11/20/crm2011-dialog-power-tips-run-a-dialog-from-a-dashboard/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/11/20/crm2011-dialog-power-tips-run-a-dialog-from-a-dashboard/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 15:22:27 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011 Business Process Book]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Dynamics CRM Workflows]]></category>
		<category><![CDATA[Form Script]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/11/20/dialog-power-tips-run-a-dialog-from-a-dashboard/</guid>
		<description><![CDATA[November 20, 2011 - Unlike workflows, dialog processes have a form-based UI, and like other forms in Dynamics CRM, they can be accessed directly by a URL. Sometimes the best way to expose these to users is from a link on a dashboard. This article explains how to do that dynamically, so a click on the link will always run the dialog as the current user.  Enjoy, and Happy Thanksgiving! ]]></description>
			<content:encoded><![CDATA[<h2>Allow Users to run a Dialog from a Dashboard Link</h2>
<p>Dialog processes, unlike workflows, must be started and run through to completion by a user. The standard way to kick them off is to select a record on a grid, click the Start Dialog button on the ribbon, and then select the dialog you want to run.</p>
<p>That&#8217;s a fine approach to take, but sometimes there are better ways to go. For example, suppose you&#8217;ve got a process to walk a receptionist through a phone conversation, and part of the process is to look up and check whether the caller is from an existing client. Depending on how the conversation goes, the process might end up creating one or more related records…but you don&#8217;t know before-hand <em>which</em> records will be created. Since the caller might not be a customer, you can&#8217;t write the process for an account or contact, and it&#8217;s a little artificial to force the creation of a lead record first … just to start a dialog process!</p>
<p>In scenarios like the one I just described it turns out the <em>user</em> record type is often the best choice for the <em>primary entity</em> of the process. That in turn raises another problem, in that it&#8217;s a little odd to require a user to navigate to their user record to start a dialog process.</p>
<p>Fortunately there&#8217;s a better way to do it, and for dialogs written for the user entity, <strong>intended to be run by the current user</strong>, the tip I describe here is the way to go. The basic idea is to create a dashboard with an HTML web resource that contains a hyperlink to run the dialog process. The link has to be constructed dynamically using JScript, and although the code might seem a little tricky if you don&#8217;t have much experience with HTML or scripting, the good news is, it&#8217;s highly re-usable code since it&#8217;s essentially the same thing every time.</p>
<p>The end result is illustrated in the following figure. I&#8217;ve got a &#8220;Refer Lead&#8221; dialog process exposed as a link in the dashboard component on the left, and I&#8217;ve placed a list of the current user&#8217;s referred leads in the component immediately to the right:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/11/112011_1522_DialogPower1.png" alt="" /></p>
<p>When the user clicks <strong>Refer Lead,</strong> the dialog opens in a new window, and the user runs through it as usual:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/11/112011_1522_DialogPower2.png" alt="" /></p>
<p>The approach I describe here uses a general technique in Dynamics CRM referred to as URL-addressable forms. This is very useful and comes up in many different contexts. I covered some of its uses and how to do it <a href="http://www.dynamicscrmtrickbag.com/2009/11/20/forms-tabsets/">in this article</a>.</p>
<p>To get a feel for how URL-addressable forms apply to dialogs, follow these steps:</p>
<ol>
<li>Run any dialog process and on the first page of the process press the Ctrl+N key combination, or press F11.</li>
<li>A new window opens, and the URL of the dialog process is exposed in the browser&#8217;s address bar.</li>
<li>Click the icon at the beginning of the URL, and drag and drop it onto your desktop.</li>
<li>Close the two open dialog windows and then double-click the shortcut on your desktop. Voila, the dialog runs correctly, and you&#8217;ve got a shortcut you can use any time you like.</li>
</ol>
<p>If you examine the nasty-looking URL, you can pretty much see what&#8217;s going on: it starts with the URL of your CRM organization, adds some stuff to tell CRM it&#8217;s a dialog you want to run, then refers to the dialog by its GUID, then refers to the user by its (ok, his or her) GUID. Here&#8217;s what a URL like that looks like:</p>
<p>https://businessprocessesindynamicscrm.crm.dynamics.com/cs/dialog/rundialog.aspx?DialogId=8C5CE987-7653-4ADD-AF10-EC52147FF0DF&amp;EntityName=systemuser&amp;ObjectId=FC09123D-2A32-417A-BA08-5C76D99BEDF6</p>
<p>It&#8217;s actually useful to understand the different components that make up a URL like that, and I provided a detailed description of them <a href="http://www.dynamicscrmtrickbag.com/2011/06/28/building-business-processes-in-dynamics-crm-2011-installment-5/">in this article</a>. Here&#8217;s a summary:</p>
<ul>
<li><a href="https://businessprocessesindynamicscrm.crm.dynamics.com">https://businessprocessesindynamicscrm.crm.dynamics.com</a> is the CRM organization URL.</li>
<li>/cs/dialog/rundialog.aspx instructs CRM you want to run a dialog.</li>
<li>?DialogId=8C5CE987-7653-4ADD-AF10-EC52147FF0DF is a query string instructing CRM which dialog to run, identifying it by its GUID.</li>
<li>&amp;EntityName=systemuser&amp;ObjectId=FC09123D-2A32-417A-BA08-5C76D99BEDF6 is another query string, this one specifying first the entity the dialog is written for, and then the GUID (&#8221;ObjectId&#8221;) of the record to run it for.</li>
</ul>
<p>So that URL will always run the dialog, but it will always run it as <em>you</em>. That is, the GUID of the user (FC09123D-2A32-417A-BA08-5C76D99BEDF6, in this case) is hardwired. To generalize this and create the dashboard solution that always runs the dialog as the <strong>current user</strong>, you really have to do two things:</p>
<ul>
<li>Figure out how to create a web resource with a hyperlink that can open up a URL-addressable form in a new window.</li>
<li>Figure out how to dynamically construct the user component of the URL. And while we&#8217;re at it, we might as well construct the organization URL dynamically too. That way, you can use the same basic code in any CRM organization.</li>
</ul>
<h2>Create the HTML Web Resource</h2>
<p>The first step is to create the HTML web resource. Navigate to Customizations, click Web Resources and then click <strong>New</strong>. Give it a good name and select <strong>Web Page (HTML)</strong> for the Type. Click Save and you will see the URL fill in, like the following figure illustrates:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/11/112011_1522_DialogPower3.png" alt="" /></p>
<p>Once you&#8217;ve saved it you can click the Text Editor button, then click the Source tab and you should see the following:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/11/112011_1522_DialogPower4.png" alt="" /></p>
<p>Just kidding! (or jk, as Jack would say) You actually have to enter the code yourself – it doesn&#8217;t just appear there.</p>
<p>Here&#8217;s the code:</p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup span="1">
<col style="width: 638px;" span="1"></col>
</colgroup>
<tbody>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="font-family:Courier New; font-size:10pt">&lt;HTML&gt;&lt;HEAD&gt;<br />
</span><span style="font-family:Courier New; font-size:10pt">&lt;SCRIPT src=&#8221;../../ClientGlobalContext.js.aspx&#8221;&gt;&lt;/SCRIPT&gt;<br />
</span></p>
<p> </p>
<p><span style="font-family:Courier New; font-size:10pt">&lt;SCRIPT type=text/javascript&gt;<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">function safeNewWindow( url, title )<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">{<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">win = window.open(url, &#8220;_blank&#8221;,&#8221;height=600,width=800,modal=yes&#8221; );<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">if( win == null )<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">{<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">alert(&#8221;Your popup blocker has blocked the new window from opening.&#8221;);<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">}<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">else<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">{<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">//win.focus();<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">}<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">}<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">&lt;/SCRIPT&gt;<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">&lt;META charset=utf-8&gt;&lt;/HEAD&gt;<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">&lt;BODY contentEditable=true&gt;&amp;nbsp;<br />
</span></p>
<p><span style="font-family:Courier New; font-size:10pt">&lt;A onclick=&#8217;safeNewWindow(GetGlobalContext().getServerUrl()+&#8221;/cs/dialog/rundialog.aspx<br />
?DialogId=1F7A557F-3927-41D4-AF8F-7282B62358DD<br />
&amp;amp;EntityName=systemuser&amp;amp;ObjectId=&#8221;+GetGlobalContext().getUserId(), &#8220;Window Title Here&#8221; )&#8217; href=&#8221;#&#8221;&gt;Run Lead Referral Process&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;<br />
</span></td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p>The first part – <span style="font-size:10pt">&lt;SCRIPT src=&#8221;../../ClientGlobalContext.js.aspx&#8221;&gt;&lt;/SCRIPT&gt; &#8212; is important because this HTML web resource is running from a dashboard. According to the Dynamics CRM SDK, &#8220;</span><span style="color:black; font-size:9pt">When you need context information outside a form, include a reference to the /webresources/ClientGlobalContext.js.aspx page in an HTML Web resource.</span><span style="font-size:10pt">&#8220;<span style="font-family:Courier New"><br />
</span>Read more on <a href="http://msdn.microsoft.com/en-us/library/gg328541.aspx">ClientGlobalContext</a>…<span style="font-family:Courier New"><br />
</span></span></p>
<p>The second part – everything in the next &lt;SCRIPT&gt;…&lt;/SCRIPT&gt; block – is a function contributed by my brilliant colleague Eric Reiner to open a window in a way Internet Explorer will considers safe. If you try to get this to work with a straight &lt;A href=url&gt;Click here&lt;/a&gt; approach, it throws an error and just sits there.</p>
<p>The third part is the URL that gets passed to the safeNewWindow function. Notice there are two calls to functions included in GetGlobalContext: getServerURL() is how we can dynamically construct the CRM organization URL, and getUserId() returns the GUID of the current user.</p>
<p>Using this approach, the only thing that&#8217;s hardwired is the <span style="font-family:Courier New; font-size:10pt">?DialogId=1F7A557F-3927-41D4-AF8F-7282B62358DD </span>part. That&#8217;s OK, though – since you&#8217;ll always know the dialog process you want to call (in this example, Refer Lead) it <em>should</em> be hardwired.</p>
<p>After creating your Web Page (HTML) web resource, be sure to publish it.</p>
<h2>Create the Dashboard</h2>
<p>The dashboard is the easy part. You can do this with either a personal dashboard or a system dashboard. To keep the steps to a minimum I used a personal dashboard in this example. Follow these steps:</p>
<ol>
<li>On the site map, click <strong>Workplace</strong> and then click <strong>Dashboards</strong>.</li>
<li>Click <strong>New</strong> on the ribbon.</li>
<li>Select any of the dashboard layouts, and then provide a name and save the dashboard.</li>
<li>Select one of the dashboard components, and then click <strong>Web Resource</strong>.</li>
<li>
<div>Click the browse button and you should be able to select the Web Page HTML web resource created above. (Not all web resources can be placed on a dashboard, but HTML web resources can be). This can get a little busy, especially if you&#8217;ve got the Activity Feeds solution installed, but if you look around a little you can find your web resource. The following figure shows my Refer Lead web resource selected in the lookup:</div>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/11/112011_1522_DialogPower5.png" alt="" /></li>
</ol>
<p>Click <strong>OK</strong> a couple of times and you&#8217;re done.</p>
<p style="margin-left: 36pt"> </p>
<h2>Personal Dashboards or System Dashboards?</h2>
<p>Now you might wonder why I went to all that trouble to make a dynamic link that will run a dialog as the current user… but then exposed it on a personal dashboard that nobody except ME will ever see. Good point. Let&#8217;s contrast personal and system dashboards to decide which one is the best approach:</p>
<ul>
<li>A personal dashboard can by default be created by any user, and can only be seen by the user that created it. Personal dashboards are user-owned, so they can be assigned to a user, a team, and they can be shared out to users or teams.</li>
<li>A system dashboard is the opposite: it can only be created by a system administrator but when created it can be seen by everybody. System dashboards are organization owned, and are always visible to every user that can see <em>any</em> dashboards.</li>
</ul>
<p>Effectively, what these differences mean is that personal dashboards can be targeted, but system dashboards cannot be. So if you want some users to see a dashboard but not all users, a personal dashboard is the way to go. After creating it, you can either assign it to a user or a team, or share it with as many users or teams as required. If it&#8217;s shared/assigned to a user, or to a team of which a user is a member, the experience will be the same as it is if you create a personal dashboard. It&#8217;s available in the My Dashboards section of the Dashboard drop-down menu:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/11/112011_1522_DialogPower6.png" alt="" /></p>
<h1>Document Dialogs using the Description Field</h1>
<p>Lots of record types have description fields, and dialog and workflow processes are no exception. With processes – and especially dialogs – the <em>kind</em> of information you use the description fields for is a little different than the typical notes you&#8217;d enter about a customer or opportunity record.</p>
<p>For example, I wouldn&#8217;t normally enter your GUID on the description field of your contact record, but I&#8217;d definitely enter the GUID (&#8221;Dialog Id&#8221; as it&#8217;s referred to in the url as we saw previously) of a dialog in the Description field on the Administration tab of the process designer:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/11/112011_1522_DialogPower7.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/11/20/crm2011-dialog-power-tips-run-a-dialog-from-a-dashboard/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Targeting Custom Forms to Business Units in Dynamics CRM 2011</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/08/22/targeting-custom-forms-to-business-units-in-dynamics-crm-2011/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/08/22/targeting-custom-forms-to-business-units-in-dynamics-crm-2011/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 23:14:53 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Customization]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/08/22/targeting-custom-forms-to-business-units-in-dynamics-crm-2011/</guid>
		<description><![CDATA[August 22, 2011 - Multiple forms per entity are an important new feature in Dynamics CRM 2011. You can target them to specific security roles, so users see the version of the form they need to see. But...you can only target them to security roles for the root business unit, which raises a challenge for "departemental forms" scenarios. Here's a solution.    ]]></description>
			<content:encoded><![CDATA[<p>I recently received this question from a reader:</p>
<p style="margin-left: 36pt"><em>I&#8217;m working with an on premise 2011 client. I&#8217;ve created one parent and three child BU&#8217;s. I have created three different forms for 4 entities and want the forms to be shown based on the security roles from the child BU&#8217;s, but whenever I go to assign them through the form I cannot see any roles but those of the parent. I feel I&#8217;m missing a step, but don&#8217;t know where I&#8217;ve gone wrong. Can you point me in the right direction?<br />
</em></p>
<p>Good question – I wondered about that myself the first time I noticed it!</p>
<p>The problem is, when you assign security roles for a custom form, the only available security roles are those from the root business unit! Since you cannot target forms directly to security roles for a child business unit, the best solution I&#8217;ve found so far is to create custom security roles in the root business unit, target the forms of interest to those security roles only, and then make sure that the folks in the business unit who need to see the custom version of the form have those security roles assigned to them.</p>
<p>The following figure shows two custom forms for the opportunity entity, East and West. (The organization has two child business units with the same names):</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/08/082211_2314_TargetingCu1.png" alt="" /></p>
<p>If you select one of the custom forms and click <strong>Assign Security Roles</strong>, at first you see this:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/08/082211_2314_TargetingCu2.png" alt="" /></p>
<p>Notice there&#8217;s no way to select a child business unit. That&#8217;s the correct observation of the blog reader who asked the question. Suppose I create two custom security roles, &#8220;East Business Unit&#8221; and &#8220;West Business Unit&#8221;. A couple of points about these custom security roles:</p>
<ul>
<li>To serve the purpose we need them for here, they need to be in the root business unit, but I&#8217;ll name them that way to indicate what they&#8217;re for.</li>
<li>They also do not need much in the way of privileges, and in particular I don&#8217;t want them to elevate anybody&#8217;s security privileges (or at least, not much!). I&#8217;ll create them by copying the Salesperson security role.</li>
</ul>
<p>After doing that and opening up the <strong>Assign Security Roles</strong> for the form again, I&#8217;ll see the new security roles. Here I&#8217;ll assign the East Business Unit security role to the East version of the form:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/08/082211_2314_TargetingCu3.png" alt="" /></p>
<p>And then, for the default version of the form (I changed the name from the bland &#8220;Information&#8221;), I&#8217;ll change the Display to option so it only displays for System Administrators:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/08/082211_2314_TargetingCu4.png" alt="" /></p>
<p>We&#8217;re almost done, but not quite: how do we push that custom East Business Unit security role out to the users in the East business unit? Assuming everybody in the business unit should see the same version of the form, <em>the easiest way to do it is by taking advantage of the default team for the business unit, and assigning the security role to it</em>.</p>
<p>Default teams for business units are new in CRM 2011, and have several advantages for an application like the one we&#8217;re discussing here. In particular, since every user assigned to a business unit is automatically assigned to (and cannot be removed from) the business unit&#8217;s default team, we know that assigning the security role to the default team will push any of its privileges (including ones to custom forms as in this example) will work.</p>
<p>So, select the default team for the East business unit, and click <strong>Manage Roles</strong>. Then select the custom East Business Unit security role, click OK, and we&#8217;re done:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/08/082211_2314_TargetingCu5.png" alt="" /></p>
<p>Now, all users in the East business unit will see the custom version of the form, and the other security roles they have will determine whether they can see other versions of the form.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/08/22/targeting-custom-forms-to-business-units-in-dynamics-crm-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dynamics CRM 2011 Charts and Dashboards: Who can see what?</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/07/15/dynamics-crm-2011-charts-and-dashboards-who-can-see-what/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/07/15/dynamics-crm-2011-charts-and-dashboards-who-can-see-what/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 23:22:38 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[charts and dashboards]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/07/15/dynamics-crm-2011-charts-and-dashboards-who-can-see-what/</guid>
		<description><![CDATA[July 15, 2011 - Recently I've had several questions on the general topic of "locking down" charts and dashboards. By default, all CRM 2011 users can see all system dashboards, and they can all create personal charts and dashboards. If you need to customize these settings, you will probably find this article interesting!]]></description>
			<content:encoded><![CDATA[<p>Microsoft Dynamics CRM 2011 includes excellent charting (or <em>visualization</em>) features. It also introduces dashboards, which can be used to present several charts together, along with a few other things such as data grids, web pages, and Silverlight forms. Dashboards are obviously highly visual, and they are very front-and-center in the user experience. For example, the default settings in an un-customized Dynamics CRM 2011 organization will make the &#8220;Microsoft Dynamics CRM Overview&#8221; dashboard the first thing a user sees when accessing CRM through the web application:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM1.png" alt="" /></p>
<p>Now there&#8217;s nothing wrong with that, and judging by how many times I was told by CRM 4.0 customers, &#8220;we need dashboards!&#8221;, the default settings – that <em>all</em> users can view and create charts and dashboards &#8212; will likely be fine for most organizations. However…they won&#8217;t be for <em>all</em> organizations, and recently I&#8217;ve had a few questions along these lines: &#8220;how can we configure it so some of our users can see the dashboards we want them to see, but not waste a lot of time creating charts and dashboards of their own&#8221;?</p>
<h2>Background: System Charts and Dashboards v. Personal Charts and Dashboards</h2>
<p>So&#8230;who can see Dynamics CRM 2011 charts and dashboards, and who can create them? These kinds of things are determined by the security roles assigned to a user, and in order to configure security roles for charts and dashboards, you need to understand the distinction between <strong>System</strong> charts and dashboards, and <strong>Personal</strong> charts and dashboards. The following table (valid for the default security roles) compares these along several different dimensions:</p>
<p> </p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup span="1">
<col style="width: 164px;" span="1"></col>
<col style="width: 200px;" span="1"></col>
<col style="width: 251px;" span="1"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt" colspan="2"><span style="color:white"><strong>Security Privileges</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>System Charts and Dashboards</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Personal Charts and Dashboards</strong></span></td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt" colspan="2"><strong>Who can create them?</strong></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Users assigned to <strong>System Administrator</strong> or <strong>System Customizer</strong> security roles</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">All users</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt" colspan="2"><strong>Who can see them?</strong> </td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">All users </td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Only the user who creates them </td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt" colspan="2"><strong>Which entity controls security privileges?</strong> </td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<ul>
<li><strong>System Chart</strong> for charts</li>
<li><strong>System Form</strong> for dashboards</li>
</ul>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<ul>
<li><strong>User Chart<br />
</strong></li>
<li><strong>User Dashboard</strong></li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p>Let&#8217;s start with <strong>System </strong><strong>charts and dashboards</strong>. As indicated in the table, most users cannot create these. These are considered system customizations, and once created they are by default visible to all users. So…it&#8217;s probably a good thing most users cannot create these things! The most obvious examples of these are the default dashboards you see in the Workplace, and charts like the Sales Pipeline chart exposed on those dashboards, as in the figure shown above.</p>
<p>Now on to <strong>Personal</strong> charts and dashboards. Notice in the previous figure the <strong>New</strong> button on the ribbon. If you click that you will be creating a <strong>Personal</strong> dashboard. It can be confusing at first keeping track of whether you&#8217;re creating a personal thing (chart or dashboard) or a system thing, so here&#8217;s my rule for how to remember the difference: <em>if you click a <strong>New</strong> button on one of the application ribbons in Dynamics CRM 2011, the thing you&#8217;re creating is <strong>personal</strong></em>. You have to work harder to create a system thing, and again, since everybody will see it, that&#8217;s a good thing. The following two figures show, respectively, the default <strong>Dashboards</strong> ribbon every user sees when working with dashboards, and the default <strong>Chart</strong> tab for the opportunity data grid.</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM2.png" alt="" /></p>
<p>On the Dashboards ribbon, any user can click <strong>New</strong> to create a new personal dashboard.</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM3.png" alt="" /></p>
<p>On the <strong>Charts</strong> tab for most data grids, any user can click <strong>New Chart</strong> to create a new personal chart.</p>
<p>From a security standpoint, personal charts and dashboards behave the same way personal views do: <em>while every user can create one, by default the only user who can see one is the one who created it</em>. This can be a little confusing at first. For example, we&#8217;re used to thinking that a user with the System Administrator role can &#8220;see everything&#8221;, but that&#8217;s not true: they can only see <em>almost</em> everything. In fact, if you examine the System Administrator security role you will see they only have User-level Read privileges on entities such as <strong>Saved View</strong>, <strong>User Chart</strong> and <strong>User Dashboard</strong>. So unless a user shares a personal chart, nobody else can see it, not even a system administrator.</p>
<h2>Locking Down Personal Charts and Dashboards</h2>
<p>OK, so now we know there are two different types of charts and dashboards. How do we modify security so our sales reps don&#8217;t waste time goofing around creating charts and dashboards?</p>
<p>Well, we know they can&#8217;t create system charts or dashboards, so we only have to prevent them from creating the personal (or user) variety. Since I&#8217;m picking on salespeople here, I&#8217;ll use the Salesperson security role in the example:</p>
<ol>
<li>Click <strong>Settings</strong>, and then click <strong>Administration</strong>.</li>
<li>Click <strong>Security Roles</strong>.</li>
<li>Select the <strong>Salesperson</strong> security role and double-click it to open the form.</li>
<li>On the <strong>Core Records</strong> tab, remove the <strong>Create</strong> and <strong>Read</strong> privileges (the first two columns) for the <strong>User Chart</strong> and <strong>User Dashboard </strong>entities:</li>
</ol>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM4.png" alt="" /></p>
<p>The following figure shows the tool tip you see when you hover over one of those empty red circles in the security role UI. If you try this, you&#8217;ll notice that the only access levels the Create and Read privileges can have for those two entities are <strong>None</strong>, and <strong>User</strong>. <img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM5.png" alt="" /></p>
<p>So, after customizing the security role, suppose I sign in as a user with the following characteristics:</p>
<ul>
<li>Only assigned one security role, the customized Salesperson role.</li>
<li>Not a member of any teams.</li>
</ul>
<p>Here&#8217;s what I will see when I navigate to Opportunities:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM6.png" alt="" /></p>
<p>The <strong>Charts</strong> tab is absent from the ribbon, just as it will be from anywhere else it would usually appear. Similarly, the <strong>Save</strong> and <strong>New</strong> buttons will be removed from the Dashboards tab:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM7.png" alt="" /></p>
<h2>Locking Down System Dashboards</h2>
<p>Now, suppose you not only don&#8217;t want them wasting time <em>creating</em> personal charts or dashboards, but you don&#8217;t even want them <em>looking</em> at system dashboards or charts. Security privileges can be used to prevent users from seeing these as well. For this, you need to customize the <strong>System Chart </strong>and <strong>System Form</strong> entities on a security role&#8217;s <strong>Customization</strong> tab:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM8.png" alt="" /></p>
<p>By default, only the System Administrator and System Customizer security roles have <strong>Create</strong> privileges for these, but all security roles have <strong>Read</strong> privileges. Continuing our example, suppose you lock down the Salesperson role even more, by removing the Read privilege for <strong>System Chart</strong> and <strong>System Form </strong>as shown in the previous figure.</p>
<p>Then if you sign in as a user with only that security role, here&#8217;s what you would see if you navigated to dashboards:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM9.png" alt="" /></p>
<p>If you navigate to the opportunity data grid, you will see that the user experience degrades in a slightly better way – instead of seeing a <strong>Not Available</strong> sign, you just don&#8217;t see the chart pane at all:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/07/071511_2321_DynamicsCRM10.png" alt="" /></p>
<h2>Role-Targeted Charts and Dashboards</h2>
<p>So that&#8217;s how you can prevent a user from seeing any (system) charts or dashboards. But suppose instead of a completely locked down experience, you were going for more of a targeted one: salespeople see the dashboards they need, customer service reps see only the dashboards they need, and so on. How would you do that? This article&#8217;s long enough already, so I leave you with that as a question. I&#8217;ll write up at least one solution to that problem in a future article, but in the meantime, if you&#8217;ve got one, feel free to let me know about it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/07/15/dynamics-crm-2011-charts-and-dashboards-who-can-see-what/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Building Business Processes in Dynamics CRM 2011: Installment 2</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/06/21/building-business-processes-in-dynamics-crm-2011-installment-2/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/06/21/building-business-processes-in-dynamics-crm-2011-installment-2/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 22:55:52 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[CRM 2011 Business Process Book]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Dynamics CRM Workflows]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/06/21/building-business-processes-in-dynamics-crm-2011-installment-2/</guid>
		<description><![CDATA[June 21, 2011 - Here’s the second installment of the serialized version of my upcoming book, Building Business Processes in Dynamics CRM 2011. In installment 1, I compared dialogs and workflows, discussed dialog properties, and introduced the most fundamental components of dialogs: Pages, and Prompt and Response pairs. In today’s excerpt I drill down and provide some more detail on how to construct Prompts and Responses. Talk about great beach books -- just wait til you get to the part on using hyperlinks in Tip Text!]]></description>
			<content:encoded><![CDATA[<table border="0" cellpadding="12">
<colgroup span="1">
<col span="1" valign="top" width="50%"></col>
</colgroup>
<tbody>
<tr>
<td><strong>June 21, 2011</strong> &#8211; Here&#8217;s the second installment of the serialized version of my upcoming book, <em>Building Business Processes in Dynamics CRM 2011</em>. In <a href="http://www.dynamicscrmtrickbag.com/2011/06/20/building-business-processes-in-dynamics-crm-2011-installment-1/" target="_self">Installment 1</a>, I compared dialogs and workflows, discussed dialog properties, and introduced the most fundamental components of dialogs: Pages, and Prompt and Response pairs. In today&#8217;s excerpt I drill down and provide some more detail on how to construct Prompts and Responses.</td>
<td style="text-align: left;" bgcolor="lightblue">This article is an excerpt from my upcoming book, <em><strong>Building Business Processes in Dynamics CRM 2011</strong></em>. Other articles in the series:</p>
<ul>
<li><a href="http://www.dynamicscrmtrickbag.com/2011/06/20/building-business-processes-in-dynamics-crm-2011-installment-1/">Installment #1: Introduction to Dialog Processes</a></li>
<li><a href="http://www.dynamicscrmtrickbag.com/2011/06/21/building-business-processes-in-dynamics-crm-2011-installment-2/">#2: Prompts and Responses in Dialogs</a></li>
<li><a href="http://www.dynamicscrmtrickbag.com/2011/06/25/building-business-processes-in-dynamics-crm-2011-installment-3/">#3: Actions and Conditions in Dialogs</a></li>
<li><a href="http://www.dynamicscrmtrickbag.com/2011/06/27/building-business-processes-in-dynamics-crm-2011-installment-4/">#4: Querying CRM Data in Dialogs</a></li>
<li><a href="http://www.dynamicscrmtrickbag.com/2011/06/28/building-business-processes-in-dynamics-crm-2011-installment-5/">#5 Calling Dialog Processes with a URL</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Some of the highlights of today&#8217;s content:</p>
<ul>
<li>The importance of the response data type.</li>
<li>A handy reference for commonly used option set fields on the case, account, contact, lead and opportunity entities.</li>
<li>Tips on how to add value to your dialogs by using hyperlinks in Tip Text</li>
</ul>
<p>Enjoy, and if you&#8217;ve got any killer examples or puzzling head-scratchers, please share them and help to improve the finished product!</p>
<p> </p>
<h2>Drilling Down on Prompts and Responses</h2>
<p>Pages are really just containers for the Prompt/Response pairs of a dialog process; these are where the real work takes place, so in this section we will review them more thoroughly. When you are designing a dialog process and click <strong>Set Properties</strong> for a Prompt and Response action, you see the Define Prompt and Response dialog. Here is the first of the two Prompt/Response pairs from the previous example:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus1.png" alt="" /></p>
<p><strong>Statement Label</strong> is a required field, and as you saw previously, the value you enter in the Define Prompt and Response dialog is what appears in the Step Editor on the Description line for the Prompt and Response.</p>
<p><strong>Prompt Text</strong> is also required. This is the text that instructs the user what to do. Depending on the business functionality, you may want to structure this as a question to be posed to a customer, or it may simply provide instructions for the user.</p>
<p><strong>Tip Text</strong> is optional. Use it to provide additional instructions for your users. For example, in a &#8220;guided conversation&#8221; dialog, the prompt text might present the question a sales representative is instructed to ask the customer. The tip text in this case could provide internal guidance to the sales representative, such as what the goal of the question is, or some of your products/services that might be relevant to the question, or tips on how to engage the customer in conversation on the topic. Tip Text, as well as Prompt Text, can contain hyperlinks. You can really jazz up your dialogs with some creative linking, and we will cover that in more detail below.</p>
<p><strong>Response Details</strong> are important, and although they are not required, it&#8217;s hard to imagine a scenario that would not require them! These are what allow the dialog process to <em>do something</em> with the information gathered from the user. The following table includes the possible response types:</p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup span="1">
<col style="width: 145px;" span="1"></col>
<col style="width: 114px;" span="1"></col>
<col style="width: 103px;" span="1"></col>
<col style="width: 277px;" span="1"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Response Type</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Data Type(s)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Provide Values</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><span style="color:white"><strong>Description</strong></span></td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>None</strong></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">NA</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">NA</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"> </td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Single Line </strong></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<ul>
<li>Text</li>
<li>Integer</li>
<li>Float</li>
</ul>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">NA</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Allows user to enter information in a single line text field. <em>Data Types described in detail below.</em></td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Option Set (radio buttons)</strong></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<ul>
<li>Text</li>
<li>Integer</li>
<li>Float</li>
</ul>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<ul>
<li>Define Values</li>
<li>Query CRM Data</li>
</ul>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Allows user to select one of two options. Can define available values within dialog, or can query from CRM data. <em>Described in detail below. </em></td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Option Set (picklist)</strong></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<ul>
<li>Text</li>
<li>Integer</li>
<li>Float</li>
</ul>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">
<ul>
<li>Define Values</li>
<li>Query CRM Data</li>
</ul>
</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Allows user to select one value from a multi-valued picklist (option set) Can define available values within dialog, or can query from CRM data.</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt"><strong>Multiple Lines (Text Only)</strong></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Text only</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">NA</td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt">Allows user to enter information in a multi-line text field.</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p>The <strong>Data Type</strong> and <strong>Provide Values</strong> settings are important enough to warrant special treatment in the following two sections.</p>
<h3>Response Details: Data Type</h3>
<p>As indicated in the table, there are three possible values for Data Type property, which is available only for Response Type values of Single Line, Option Set (radio buttons), and Option Set (picklist).</p>
<p>This is important aspect of dialog design and can be confusing at first, so let&#8217;s drill down on it.</p>
<p>Let&#8217;s extend the Create Case for Account dialog to understand the importance of the Data Type property. Suppose in addition to filling in the Title and Customer fields on the new case, you also wanted to fill in the Case Origin field. This is a system-defined option set field available for the case entity, and by default has values of Phone, E-Mail and Web.</p>
<p>Suppose you add a new prompt/response pair to the dialog, click <strong>Set Properties</strong>, and configure them as shown in the next figure:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus2.png" alt="" /></p>
<p>The selected Data Type here is <strong>Text</strong>, which is the default value. (This is one of those places in Dynamics CRM where once you save a value, it cannot be changed.) After saving and closing the Define Prompt and Response dialog, the Step Editor will look like this:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus3.png" alt="" /></p>
<p>You might then click Set Properties, thinking you can use Dynamic Values to update the Case Origin field with the value selected by the user in the process. The problem is that the Case Origin field on the case entity is an option set field, which although it has a label (Phone, E-mail, Web), is actually defined as an integer field. In the dialog, this means that you cannot update the field value with the process value, since it&#8217;s the wrong data type. You can see this in the following figure, where the selected field is Case Origin, and in the Dynamic Values section, the Case Origin variable has been selected in the Local Values section of the Look for drop-down:</p>
<p> </p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus4.png" alt="" /></p>
<p>If you try this, you will notice that you cannot select anything to populate to the Case Origin field on the case form. This is the standard behavior for when data types don&#8217;t match.</p>
<p>Now what you might try at this point is to build conditional logic into your dialog to work around this, testing for the value the user selected for the Case Origin in the dialog, and hard-wiring the entry of the corresponding option set value for Case Origin on the form. Yuck.</p>
<p>We will cover this in more detail below, but for now, let&#8217;s look at the right way to get this done!</p>
<p>The key is the Response Data Type, which in this example needs to be an Integer in order to directly update the Case Origin field. You will need to delete the Prompt and Response line (since you cannot change the Data Type once it&#8217;s saved), and re-do it like this:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus5.png" alt="" /></p>
<p>The two most important things to notice are:</p>
<ol>
<li>The selected Data Type is <strong>Integer</strong>. This will allow you to update the Case Origin field on the case form with the value selected by the user as the dialog runs.</li>
<li>Notice the Value of the Phone <strong>Response Value</strong> is 1. This must match up to the value stored by Dynamics CRM for that option set on the form.</li>
</ol>
<p>Finally, after doing this, you can click Set Properties on the Create Case step of the dialog. The following figure illustrates that – once the correct data type is defined for the Case Origin dialog field – you can in fact directly update the Case Origin field on the case form. That&#8217;s what the &#8220;Response Option Set Value&#8221; field is for:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus6.png" alt="" /></p>
<p><span style="font-family:Cambria"><strong>Tip: Commonly Used Option Set Values<br />
</strong></span></p>
<p>The Dynamics CRM 2011 SDK contains a complete list of option set values for all system option set fields in the product…but that&#8217;s about as helpful as saying the dictionary contains a complete list of all the words in the English language! Like so many things, this issue – matching prompt/response values in a dialog to option set values for a Dynamics CRM field – has an 80/20 rule: most of your needs will be satisfied by a small number of the available options. In that spirit, this section includes the most frequently encountered option set fields from what we might refer to as the <em>big five</em> customizable entities in Dynamics CRM 2011. Since we&#8217;ve been discussing the Case entity, we start with that one, and then proceed alphabetically with Account, Contact, Lead and Opportunity.</p>
<ol>
<li>
<h4><strong>Commonly Used Option Set Fields for the Case Entity<br />
</strong></h4>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup span="1">
<col style="width: 223px;" span="1"></col>
<col style="width: 183px;" span="1"></col>
<col style="width: 128px;" span="1"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Option Set Field<br />
</strong></span><span style="color:white"><strong>Label (Schema Name)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Default Label</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Corresponding Value</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="3"><span style="color:white"><strong>Case Origin (caseorigincode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Phone</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">E-mail</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Web</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="3"><span style="color:white"><strong>Case Type (casetypecode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Question</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Problem</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Request</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="5"><span style="color:white"><strong>Satisfaction (customersatisfactioncode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Very Satisfied</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">5</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Satisfied</td>
<td style="padding-left: 7px; padding-right: 7px">4</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Neutral</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Dissatisfied</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Very Dissatisfied</td>
<td style="padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="3"><span style="color:white"><strong>Priority (prioritycode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">High</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Medium</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Low</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="3"><span style="color:white"><strong>Service Level (contractservicelevelcode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Gold</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Silver</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt">Bronze</td>
<td style="padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt">3</td>
</tr>
</tbody>
</table>
</div>
<p> </li>
<li>
<h4><strong>Commonly Used Option Set Fields for Account<br />
</strong></h4>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup span="1">
<col style="width: 236px;" span="1"></col>
<col style="width: 183px;" span="1"></col>
<col style="width: 128px;" span="1"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Option Set Field<br />
</strong></span><span style="color:white"><strong>Label (Schema Name)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Default Label</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Corresponding Value</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="4"><span style="color:white"><strong>Address Type (address1_addresstypecode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Bill To</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Ship To</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Primary</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Other</td>
<td style="padding-left: 7px; padding-right: 7px">4</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="7"><span style="color:white"><strong>Shipping Method (address1_shippingmethodcode)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px">Airborne</td>
<td style="padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">DHL</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">FedEx</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">UPS</td>
<td style="padding-left: 7px; padding-right: 7px">4</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Postal Mail</td>
<td style="padding-left: 7px; padding-right: 7px">5</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Full Load</td>
<td style="padding-left: 7px; padding-right: 7px">6</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Will Call</td>
<td style="padding-left: 7px; padding-right: 7px">7</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="2"><span style="color:white"><strong>Freight Terms (address1_freighttermscode)<br />
</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px">FOB</td>
<td style="padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">No Charge</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="3"><span style="color:white"><strong>Industry<br />
(industrycode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Accounting</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">…</td>
<td style="padding-left: 7px; padding-right: 7px">…</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Wholesale</td>
<td style="padding-left: 7px; padding-right: 7px">33</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="4"><span style="color:white"><strong>Ownership<br />
(ownershipcode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Public</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Private</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Subsidiary</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Other</td>
<td style="padding-left: 7px; padding-right: 7px">4</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="12"><span style="color:white"><strong>Relationship Type (customertypecode)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px">Competitor</td>
<td style="padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Consultant</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Customer</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Investor</td>
<td style="padding-left: 7px; padding-right: 7px">4</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Partner</td>
<td style="padding-left: 7px; padding-right: 7px">5</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Influencer</td>
<td style="padding-left: 7px; padding-right: 7px">6</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Press</td>
<td style="padding-left: 7px; padding-right: 7px">7</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Prospect</td>
<td style="padding-left: 7px; padding-right: 7px">8</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Reseller</td>
<td style="padding-left: 7px; padding-right: 7px">9</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Supplier</td>
<td style="padding-left: 7px; padding-right: 7px">10</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Vendor</td>
<td style="padding-left: 7px; padding-right: 7px">11</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Other</td>
<td style="padding-left: 7px; padding-right: 7px">12</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="2"><span style="color:white"><strong>Category<br />
(accountcategorycode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Preferred Customer</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Standard</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  solid 2.25pt"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt"> </td>
</tr>
</tbody>
</table>
</div>
<p> </li>
<li>
<h4><strong>Commonly Used Option Set Fields for Contact<br />
</strong></h4>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup span="1">
<col style="width: 236px;" span="1"></col>
<col style="width: 183px;" span="1"></col>
<col style="width: 128px;" span="1"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Option Set Field<br />
</strong></span><span style="color:white"><strong>Label (Schema Name)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Default Label</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Corresponding Value</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"><span style="color:white"><strong>Address Type </strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Same as Account</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"><span style="color:white"><strong>Shipping Method </strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Same as Account</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"><span style="color:white"><strong>Freight Terms </strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Same as Account</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="3"><span style="color:white"><strong>Role<br />
(accountrolecode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Decision Maker</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Employee</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Influencer</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="2"><span style="color:white"><strong>Gender<br />
(gendercode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Male</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Female</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="4"><span style="color:white"><strong>Marital Status (familystatuscode)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px">Single</td>
<td style="padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Married</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Divorced</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Widowed</td>
<td style="padding-left: 7px; padding-right: 7px">4</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="2"><span style="color:white"><strong>Category<br />
(accountcategorycode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Preferred Customer</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Standard</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  solid 2.25pt"><span style="color:white"><strong>Contact Method<br />
(preferredcontactmethodcode)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt">Same as Account</td>
<td style="padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt"> </td>
</tr>
</tbody>
</table>
</div>
<p> </li>
<li>
<h4><strong>Commonly Used Option Set Fields for Lead<br />
</strong></h4>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup span="1">
<col style="width: 236px;" span="1"></col>
<col style="width: 183px;" span="1"></col>
<col style="width: 128px;" span="1"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Option Set Field<br />
</strong></span><span style="color:white"><strong>Label (Schema Name)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Default Label</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Corresponding Value</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="3"><span style="color:white"><strong>Lead Source<br />
(leadsourcecode)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px">Advertisement</td>
<td style="padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">Employee Referral</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">External Referral</td>
<td style="padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Partner</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">4</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px">Public Relations</td>
<td style="padding-left: 7px; padding-right: 7px">5</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Seminar</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">6</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px">Trade Show</td>
<td style="padding-left: 7px; padding-right: 7px">7</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Web</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">8</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px">Word of Mouth</td>
<td style="padding-left: 7px; padding-right: 7px">9</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Other</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">10</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="2"><span style="color:white"><strong>Rating<br />
(leadratingcode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Hot</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Warm</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Cold</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"><span style="color:white"><strong>Industry<br />
(industryscode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Same as Account</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  solid 2.25pt"><span style="color:white"><strong>Contact Method<br />
(preferredcontactmethodcode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt">Same as Account</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt"> </td>
</tr>
</tbody>
</table>
</div>
<p> </li>
<li>
<h4><strong>Commonly Used Option Set Fields for Opportunity<br />
</strong></h4>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup span="1">
<col style="width: 236px;" span="1"></col>
<col style="width: 183px;" span="1"></col>
<col style="width: 128px;" span="1"></col>
</colgroup>
<tbody>
<tr style="background: #4f81bd">
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Option Set Field<br />
</strong></span><span style="color:white"><strong>Label (Schema Name)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Default Label</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top:  solid 2.25pt; border-left:  none; border-bottom:  solid 2.25pt; border-right:  none"><span style="color:white"><strong>Corresponding Value</strong></span></td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="2"><span style="color:white"><strong>Revenue<br />
(isrevenuesystemcalculated)</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px">System Calculated</td>
<td style="padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr style="background: #d8d8d8">
<td style="padding-left: 7px; padding-right: 7px">User Provided</td>
<td style="padding-left: 7px; padding-right: 7px">0</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
<td style="padding-left: 7px; padding-right: 7px"> </td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  none" rowspan="2"><span style="color:white"><strong>Rating<br />
(opportunityratingcode)</strong></span></td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Hot</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">1</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px">Warm</td>
<td style="padding-left: 7px; padding-right: 7px">2</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none"> </td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">Cold</td>
<td style="background: #d8d8d8; padding-left: 7px; padding-right: 7px">3</td>
</tr>
<tr>
<td style="background: #4f81bd; padding-left: 7px; padding-right: 7px; border-left:  none; border-bottom:  solid 2.25pt"> </td>
<td style="padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt"> </td>
<td style="padding-left: 7px; padding-right: 7px; border-bottom:  solid 2.25pt"> </td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<h3>Response Details: Provide Values</h3>
<p>The other important option to understand when collecting response from users is whether to enter values manually as you design the process, or to get them from a CRM query. This is an important and potentially complex topic, and we will cover it in detail later in the book. For now, consider the following figure:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus7.png" alt="" /></p>
<p>In the previous examples, the <strong>Define Values</strong> option was selected, which means you simply enter the values yourself. Here, the <strong>Query CRM data</strong> option is selected. This is a super-important capability of dialog processes in Dynamics CRM 2011, as it lets you build prompts based on CRM data…so as the underlying data change, your dialog processes dynamically reflect the changing information.</p>
<p>In the previous figure, the <strong>Query Variable</strong> &#8220;Practices Query&#8221; has already been defined. Query variables must always be defined before they can be used (makes sense when you think about it, right?), and in the Step Editor it might look like this:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus8.png" alt="" /></p>
<p>In this example, &#8220;Practices&#8221; is a custom entity my organization uses to track our different professional practice areas (e.g., CRM, Messaging…). If we want to associate a case record with a specific practice, the ability to build a query and populate a Prompt option set with all of our practices provides that ability.</p>
<p>Again, more details on this later, but it&#8217;s important to know at this point that you won&#8217;t always have to enter all of the possible option set values manually as you design the dialog process!</p>
<p><span style="font-family:Cambria"><strong>Tip: Use of Hyperlinks in Prompt Text and Tip Text.<br />
</strong></span></p>
<p>Notice that both of these have a button you can use to enter a hyperlink. This gives you a way to use external web content to support your dialog processes, and the general rule is: as long as a user can get to the content, you can use it. For example, suppose you enter the following text to the <strong>Tip Text</strong> in the Create Case for Account dialog:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus9.png" alt="" /></p>
<p>You can then position the cursor just after the &#8220;cases:&#8221; text, and click the <img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus10.png" alt="" /><br />
<strong>Insert Hyperlink</strong> button to get the Insert Hyperlink dialog:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus11.png" alt="" /></p>
<p>The Text to display field is the link text the user will be able to click, and the URL is where they will navigate to. For example, you might enter the following values:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus12.png" alt="" /></p>
<p>After clicking OK and returning to the Define Prompt and Response dialog, you will see the following in the Tip Text:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus13.png" alt="" /></p>
<p>And after saving and activating the dialog, the user experience would appear like the following figure:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/062111_2254_BuildingBus14.png" alt="" /></p>
<p>When a user clicks the link, the referenced URL will open in a new window. This gives you the ability to extend dialog processes in lots of interesting ways, including:</li>
</ol>
<ul style="margin-left: 38pt">
<li>Linking to special offer pages on a web site for a campaign follow-up dialog.</li>
<li>Linking to Dynamics CRM forms using the &#8220;URL-addressable&#8221; forms technique that allows any record for any entity to be navigated to with its unique URL. For example, if you use the product catalog, a specific product form could be opened with a URL like this one:</li>
</ul>
<p><span style="font-family:Courier New; font-size:10pt">https://&lt;yourorganizationhere&gt;/main.aspx?etc=1024&amp;extraqs=%3f_gridType%3d1024%26etc%3d1024%26id%3d%257bCBAC3403-1C74-E011-8947-1CC1DEE8DAD5%257d%26rskey%3d37636470&amp;pagetype=entityrecord<br />
</span></p>
<ul>
<li>Linking to a Microsoft or other Internet page for documentation, supplemental training materials and so forth. This is essentially the example shown above.</li>
<li>Linking to a Web Resource HTML page contained in a Dynamics CRM 2011 solution.</li>
</ul>
<p>Use your imagination and creativity, but be aware of the following caveats:</p>
<ul style="margin-left: 38pt">
<li>Hyperlinks in dialogs cannot be created dynamically in the current release.</li>
<li>Users must have permissions to view the hyperlink, and since the hyperlink is external to Dynamics CRM, it would be easy to include a link some users could access and others could not. For example, permissions in SharePoint and Dynamics CRM are managed separately, so you cannot assume that any user with permissions in CRM to run a dialog process will have access to a SharePoint URL you provide as a hyperlink.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/06/21/building-business-processes-in-dynamics-crm-2011-installment-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Managing Users, Teams and Security</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/06/16/managing-users-teams-and-security/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/06/16/managing-users-teams-and-security/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 16:27:27 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Training and Certification]]></category>
		<category><![CDATA[crm 2011 certification]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/06/16/managing-users-teams-and-security/</guid>
		<description><![CDATA[This topic accounts for about 20% of the total score on the Dynamics CRM 2011 Customization and Configuration exam. Overall, users, teams, business units and security are significantly different in CRM 2011 compared to 4.0. Some of the issues highlighted here have come up a couple of times recently on customer engagements I&#8217;ve been working [...]]]></description>
			<content:encoded><![CDATA[<p>This topic accounts for about 20% of the total score on the <a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=MB2-866">Dynamics CRM 2011 Customization and Configuration exam</a>. Overall, users, teams, business units and security are significantly different in CRM 2011 compared to 4.0. Some of the issues highlighted here have come up a couple of times recently on customer engagements I&#8217;ve been working on, so I thought I&#8217;d post them up and make a down-payment on my CRM 2011 certification prep content at the same time. Cheers.</p>
<ul>
<li>
<div><strong>Business Units</strong></div>
<ul>
<li>Names can be changed.</li>
<li>Can change the name of the root business unit to something other than the name of the organization.</li>
<li>Can delete business units in CRM 2011. To delete a business unit, you must remove all users, remove all teams, and then disable the business unit. Then it can be deleted.</li>
</ul>
</li>
<li>
<div><strong>Users and Teams<br />
</strong></div>
<ul>
<li>In CRM 2011, both are full security principles – i.e., records can be assigned to both users and teams.</li>
<li>Users must always be assigned to a business unit, and they can only be assigned to a single business unit at a time.</li>
<li>Teams must be assigned to a business unit also, but the teams you create can include members (users, that is) from any business unit.</li>
<li>Teams, just like users, can be assigned security roles.</li>
<li>When users are added as members of a team, they keep all security privileges included in any of the security roles they&#8217;ve been assigned, plus they inherit all of the privileges from the team&#8217;s security roles. Since security roles are &#8220;additive&#8221;, this means that adding a user to a team will <em>never</em> give them less privileges and <em>may</em> give them more.</li>
</ul>
</li>
<li>
<div><strong>Default business unit teams</strong> are created by the system when a business unit is created. These teams behave differently in some important respects from regular teams. Default business unit teams:</div>
<ul>
<li>Cannot be deleted.</li>
<li>Cannot have their names changed.</li>
<li>Cannot have members not in the business unit.</li>
<li>Automatically assign membership to every user assigned to the business unit; cannot have their membership changed apart from changing a user&#8217;s business unit.</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/06/16/managing-users-teams-and-security/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Placing Reports on Dynamics CRM 2011 Dashboards</title>
		<link>http://www.dynamicscrmtrickbag.com/2011/06/07/placing-reports-on-dynamics-crm-2011-dashboards/</link>
		<comments>http://www.dynamicscrmtrickbag.com/2011/06/07/placing-reports-on-dynamics-crm-2011-dashboards/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 13:29:53 +0000</pubDate>
		<dc:creator>Richard Knudson</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Form Script]]></category>
		<category><![CDATA[Tips, Tricks, Q&A]]></category>

		<guid isPermaLink="false">http://www.dynamicscrmtrickbag.com/2011/06/07/placing-reports-on-dynamics-crm-2011-dashboards/</guid>
		<description><![CDATA[June 7, 2011, D-Day + 24,091 - You can give reports more prominence by exposing them on Dynamics CRM 2011 dashboards. Here's an article that explains how to do it for a very useful and often under-appreciated out of the box report, "Activities", that includes information about activities, grouped by user, activity type and a few other things.  ]]></description>
			<content:encoded><![CDATA[<p>Dynamics CRM 2011 includes plenty of nice reports out of the box; in fact there are so many of them it can be difficult to sift through them all to find the ones you need. In the web client, you can click <strong>Workplace</strong> and then <strong>Reports</strong> for a full listing; the following figure shows just a few of them, including a couple of custom ones my organization uses:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/060711_1329_PlacingRepo1.png" alt="" /></p>
<p>In my experience, the one thing that definitely <em>doesn&#8217;t</em> work is to simply let your users explore until they find the reports they need! If you&#8217;re responsible for customizing or configuring Dynamics CRM, you will generally need to take some steps to <em>push</em> the right reports out to the people who need them, and in CRM 2011, dashboards give you a great way of doing that. For example, take the built-in <strong>Activities</strong> report. It presents a stacked column chart, grouped by users, with segments of each column representing counts of the various activity types performed by users:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/060711_1329_PlacingRepo2.png" alt="" /></p>
<p>Rather than force users to locate it in the list of reports, you can give it more prominence by exposing it on a dashboard. For example, I&#8217;ve customized my organization&#8217;s dashboards to include one called &#8220;Activities: all Users, Last 90 Days&#8221;, and as a system dashboard it&#8217;s selectable from the Dashboards drop-down list:</p>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/060711_1329_PlacingRepo3.png" alt="" /></p>
<p> </p>
<h2>Placing a Report on a Dashboard</h2>
<p>You can&#8217;t place a report directly on a dashboard, however. In Dynamics CRM 2011, dashboards are really just specialized web pages designed to expose four kinds of &#8220;components&#8221;: Charts, Lists, Web Resources, and Iframes. The trick to placing a report on a dashboard is to remember that reports – along with all other views and forms – have unique URLs that can be used for direct navigation, or as the URL property of an Iframe control on a dashboard.</p>
<p>To create a dashboard that exposes the Activities report, follow these steps, using the web client:</p>
<ol>
<li>Click Workplace, and then click Reports.</li>
<li>Locate the Activities report. The default filter is set to include activities for the last 14 days, so optionally, click Edit Default Filter and change the Last X Days filter to whatever you&#8217;d like, then click Save Default Filter.</li>
<li>Click Run Report. After a few seconds, the report will appear in the SQL Server Reporting Services (SSRS) Report Viewer.</li>
<li>
<div>Press the Ctrl+N key combination to open a new window with the URL/address field exposed, and click inside the field:</div>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/060711_1329_PlacingRepo4.png" alt="" /></p>
<p> </li>
<li>After making sure the entire URL is selected, use Ctrl+C to get it on the clipboard, and then close out of the two report viewer windows.</li>
<li>
<div>Create a new dashboard, give it an appropriate name, and delete all of the components except for one, and use the Increase Height and Increase Width buttons to make it big, along these lines:</div>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/060711_1329_PlacingRepo5.png" alt="" /></p>
<p> </li>
<li>
<div>Insert an Iframe control, and in the URL field, use Ctrl+V to paste in the URL on the clipboard:</div>
<p><img src="http://www.dynamicscrmtrickbag.com/wp-content/uploads/2011/06/060711_1329_PlacingRepo6.png" alt="" /></p>
<p> </li>
<li>Save &amp; Close twice, publish your new dashboard and you&#8217;re good to go.</li>
</ol>
<p>A couple of important points about that gnarly-looking URL:</p>
<ul style="margin-left: 54pt">
<li>Note the &#8220;?action=run&#8221; bit after &#8220;viewer.aspx&#8221;. This is what will cause the report to open up directly in the viewer, bypassing the filter window you&#8217;ll get if you simply point to the report in the report grid and use the built-in Copy a Link command. (And if you ever see ?action=filter in the URL and want to open the viewer directly, just replace it with ?action=run.)</li>
<li>
<div>The stuff to the right of &#8220;&amp;id=%7b&#8221; is the GUID – the id that uniquely identifies records in Dynamics CRM, in this case the Activities report. Using Jscript to dynamically construct a URL that incorporates a record&#8217;s GUID is the key to many a Dynamics CRM mashup, so in case you haven&#8217;t seen this before, here&#8217;s a tip: the GUID itself is bracketed by &#8220;%7b&#8221; in front and &#8220;%7d&#8221; at the end; in my example, this portion of the URL looks like this: ?id=%7b6F7A3F7C-041F-E011-86DF-1CC1DE799302%7d – so the actual GUID is 6F7A3F7C-041F-E011-86DF-1CC1DE799302. As an example of when this is important, here&#8217;s a snippet of JScript that constructs a URL for a contact record:</div>
<p> </p>
<p><span style="font-family:Courier New">var serverurl = Xrm.Page.context.getServerUrl();<br />
</span></p>
<p><span style="font-family:Courier New">var recordurl = serverurl+&#8221;main.aspx?etn=contact&amp;id=&#8221;;<br />
</span></p>
<p><span style="font-family:Courier New">var strtemp = contactid.replace(&#8221;{&#8221;, &#8220;%7b&#8221;);<br />
</span></p>
<p><span style="font-family:Courier New">var strtemp = strtemp.replace(&#8221;}&#8221;, &#8220;%7d&#8221;);<br />
</span></p>
<p><span style="font-family:Courier New">recordurl += strtemp;<br />
</span></p>
<p><span style="font-family:Courier New">recordurl += &#8220;&amp;pagetype=entityrecord&#8221;;<br />
</span></li>
</ul>
<p>At the end of that bit of code, the recordurl variable will contain a nicely defined URL, suitable for inclusion in a workflow-generated email for example, for a contact record from my CRM. So just remember: if you&#8217;re one of my contacts, you&#8217;re a lot more than just a number: for example, you&#8217;re a GUID. <a href="http://www.dynamicscrmtrickbag.com/subscribe/">Become a Dynamics CRM Trick Bag subscriber</a>, and in addition to getting your very own GUID, I&#8217;ll send you my monthly e-mail newsletter, Dynamics CRM News You Can Use.<br />
In the meantime, here&#8217;s a recorded segment from a recent training session I gave that demonstrates how to do this:<iframe width="425" height="349" src="http://www.youtube.com/embed/Z1c6X-mKSxE" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dynamicscrmtrickbag.com/2011/06/07/placing-reports-on-dynamics-crm-2011-dashboards/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

