<?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>Pedro Innecco &#187; IT</title>
	<atom:link href="http://www.pedroinnecco.com/category/it/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pedroinnecco.com</link>
	<description>ICT Specialist: pgDMS, MBA, MBSS, MCTS, MCP, VTSP</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:01:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Dynamics CRM: JScript vs workflow – Caveats</title>
		<link>http://www.pedroinnecco.com/2012/01/dynamics-crm-jscript-vs-workflow-caveats/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dynamics-crm-jscript-vs-workflow-caveats</link>
		<comments>http://www.pedroinnecco.com/2012/01/dynamics-crm-jscript-vs-workflow-caveats/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 15:09:48 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Dynamics CRM]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=1103</guid>
		<description><![CDATA[JScripts in Dynamics CRM are a powerful feature to enhance the user interface in Dynamics CRM. We can use JScripts to perform calculations and validate fields in forms in order [...]]]></description>
			<content:encoded><![CDATA[<p>JScripts in Dynamics CRM are a powerful feature to enhance the user interface in Dynamics CRM. We can use JScripts to perform calculations and validate fields in forms in order to introduce a better user experience. However, JScripts are a client-side based, and only work with the desktop-based (main) forms. In other words, if the user is accessing Dynamics CRM through a mobile device displaying the mobile forms, or using a 3rd party client for a tabled device, the JScripts will not be loaded at all. Workflows on the other hand are server-based, and they will execute no matter which device and client is used to access Dynamics CRM.</p>
<p>This often raises the question of JScript versus workflows when customising Dynamics CRM, particularly when designing a <a href="http://www.pedroinnecco.com/?p=413" title="Dynamics CRM: Diving into the sales pipeline – Part 1">sales pipeline workflow</a>. In this posts I explain how to combine the usage of both JScript and workflows in order to get the best of both worlds, and the most out of Dynamics CRM.<span id="more-1103"></span></p>
<h2>Overview</h2>
<p>Dynamics CRM 2011 is a web-based application that uses a multi-tier architecture. This means that the Dynamics CRM platform serves as an intermediary between the client access users and the data. The application business logic sits in this intermediary bit, and this is where Dynamics CRM workflows are located. When a workflow is executed, it is executed at the server level, not at the client level (e.g.: Internet Explorer or Microsoft Outlook). JScripts on the other hand are interpreted at the client level.</p>
<h2>Considerations</h2>
<p>Consider my previous Sales Pipeline tutorial (see <a href="http://www.pedroinnecco.com/?p=880" title="Dynamics CRM: Diving into the sales pipeline – Part 2" target="_blank">second post of the series</a>). For the Opportunity record we added an option set (i.e.: a drop-down menu) where the user can select the stage of the sales pipeline for the opportunity is. The current sales pipeline stage, along with the user rating (e.g.: <em>Hot, Warm, Cold</em>) calculates the Probability for the opportunity record. We achieved this with the use of JScripts, which are quite handy since JScript provide users with an on-the-fly update. As the <strong>Pipeline Phase</strong> and <strong>Rating</strong> fields change, the <strong>Probability</strong> field is immediately recalculated.</p>
<p>However, since JScripts only work on main forms, this whole logic would be simply disregarded if the record is being edited through another method, such as through a mobile form , a web service call or a 3rd party client for tablet devices. How can we solve this issue?</p>
<p class="warnbox"><strong>About Mobile Express:</strong> Mobile Express is how Microsoft calls the mobile-friendly forms that can be used to access Dynamics CRM with mobile devices. Microsoft cleverly calls them &#8220;express&#8221; so they can argue that they are far from being a full-featured solution. So we must work around the limitations of these forms. Even though Microsoft calls them &#8220;express&#8221;, at the moment these mobile forms lack some fundamental functionality (such as disallowing users to edit records) so I am very reluctant to use them. I suggest you also avoid using them if you can.<br />
<br/><strong>Hacking Mobile Express:</strong> It is possible to modify the Mobile Express Cascading Style Sheet (CSS) files to hide the New, Edit and Delete buttons that would allow users to create or modify records bypassing any JScript you have. You can find the instructions on how to do it by at <a href="http://social.msdn.microsoft.com/Forums/en-GB/crm/thread/9d4165d2-08fb-451d-a0bb-97bbc4e49c84" title="MSDN CRM Forum: How to hide Mobile Express buttons - Solution by nrodri" target="_blank">this forum</a> post. <strong>Please bear in mind that this hack is NOT supported by Microsoft</strong>. Thanks to Nuno R Costa for the tip.</p>
<p>Consider now the workflows introduced in my Sales Pipeline tutorial (see <a href="http://www.pedroinnecco.com/?p=971" title="Dynamics CRM: Diving into the sales pipeline – Part 3" target="_blank">third post of the series</a>). If you look into the <strong>Sales Process</strong> workflow, you will notice that at every stage (<code>1 - Prospect, 2 - Proposal, 3 - Negotiation</code>) we wait for the <strong>Process Code</strong> (<code>salesstagecode</code>) field to change (which moves the workflow to its next stage). However the workflow doesn&#8217;t perform any actions.</p>
<h2>Solution</h2>
<p>The solution is to add an action at every stage to replicate the functionality of the JScript. Since workflows work at the server level, no matter what client or method was used to modify a record the workflow will be triggered as per its rules and its actions will take place. One might wonder if that is the case, then why bother with JScript at all. But remember when I said in the introduction of this post. JScript is all about enhancing the user experience, while a workflow works in the background, away from the user&#8217;s eyes. The issue, particularly for Dynamics CRM on-demand users, is to design a workflow using the built-in workflow designer and avoiding Visual Studio.</p>
<p>So let&#8217;s get back to the Sales Pipeline example. Consider the following screenshot of the Sales Pipeline workflow:</p>
<p style="text-align: center;"><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_01c.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_01c-300x229.png" alt="" title="Post Mortem workflow: Design (revisited)" width="300" height="229" class="aligncenter size-medium wp-image-1045" /></a></p>
<p>Notice that under each stage, between the lines <code>Wait Until Opportunity:Process Code equals [...]</code> and <code>Otherwise, wait until Opportunity:Status equals [...]</code> there is a line that says <code>Select this row and click add step</code>. This is because there are no actions being executed there. What we want to do is select this line at each stage, and add the appropriate actions to replicate the functionality of the JScript.</p>
<p>For example under the first stage (<code>1 - Prospect</code>) we would add an action to change the value of the <strong>Sales Pipeline</strong> field to <code>2 - Proposal</code>. Moreover, we would need to add an additional wait condition to update the <strong>Probability</strong> field according to the option selected in the <strong>Rating</strong> option set. For more information on workflow conditional waiting, please refer to the <a href="http://www.pedroinnecco.com/?p=971" title="Dynamics CRM: Diving into the sales pipeline – Part 3" target="_blank">third post</a> of my sales pipeline tutorial.</p>
<h2>Final Words</h2>
<p>At first sight, if we could design a Dynamics CRM deployment that relies completely on workflows and no JScripts at all, it might seem as we could have a fail-proof business process. However the server-side nature of workflows at the platform layer makes them more linear and less receptive for situations in which users require a more dynamic response, such as on-the-fly calculations and conditional formatting of fields. When dealing with JScripts and workflows don&#8217;t start from the premise that you must choose either one of them, but how you can combine both of them. Finally, bear that JScripts only apply to browser-based forms (i.e.: Main Forms). In other words, all of your JScripts will be disregarded if a user manipulates data through Mobile Express forms, or through some sort of integration with another product.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2012/01/dynamics-crm-jscript-vs-workflow-caveats/' addthis:title='Dynamics CRM: JScript vs workflow – Caveats '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2012/01/dynamics-crm-jscript-vs-workflow-caveats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamics CRM: Considerations when customising address fields</title>
		<link>http://www.pedroinnecco.com/2012/01/dynamics-crm-considerations-when-customising-address-fields/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dynamics-crm-considerations-when-customising-address-fields</link>
		<comments>http://www.pedroinnecco.com/2012/01/dynamics-crm-considerations-when-customising-address-fields/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 17:18:34 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[dynamics crm]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=1152</guid>
		<description><![CDATA[The perceived issue of how to store addresses in computer systems always fascinated me. Not because of any apparent complexity one might believe that exists when handling addresses, but mostly [...]]]></description>
			<content:encoded><![CDATA[<p>The perceived issue of how to store addresses in computer systems always fascinated me. Not because of any apparent complexity one might believe that exists when handling addresses, but mostly because of people&#8217;s undeserved anxiety around the subject. And in Dynamics CRM it is no different.</p>
<p>The issue tends to surround the myth that countries and regions with different subdivisions would require complex requirements for address handling. I came across a couple of clients who believe that they require such a complex solution that  their Dynamics CRM deployments almost came onto  a halt because of it such hurdle. I the end, the solution relies not on complex customisation, but on standards compliance, a little bit of compromising, but most importantly: common sense.<span id="more-1152"></span></p>
<h2>What is the issue?</h2>
<p>Well if you ask me, there is no issue. But here is the source of discord. Most countries and regions in the world (with the exception of some microstates) have constituent entities (i.e.: top-level subdivisions), which in different countries tend to carry different names. Here are four examples of countries and the name of their respective constituent entities:</p>
<ul>
<li>Germany &#8211; Federated States</li>
<li>Uruguay &#8211; Departments</li>
<li>Sweden &#8211; Counties</li>
<li>Switzerland &#8211; Cantons</li>
</ul>
<p>By default Dynamics CRM has the following fields to store address information:</p>
<ul>
<li>Address Line 1</li>
<li>Address Line 2</li>
<li>Address Line 3</li>
<li>City</li>
<li>State/Province</li>
<li>Country/Region</li>
</ul>
<p>Now let&#8217;s consider the chart below, which is a rough representation of how addresses are hierarchically defined:</p>
<p style="text-align: center;"><img src="http://www.pedroinnecco.com/files/crm_address-issue_00.png" alt=""Address hierarchy diagram<a href="http://www.pedroinnecco.com/files/crm_address-issue_02.png"></p>
<p>Many customers tend to see as an issue that in Dynamics CRM the top-level constituency entity of a country or region is named as <strong>State/Province</strong>, gripping on arguments such as &#8220;<em>but what if here in country X we use counties rather than states or provinces?</em>&#8221; As a result, customers tend to add custom fields for specific subdivisions in hope to use them with the relevant countries/regions. However, consider the following cut-out (i.e.: resumed) diagram of client records in a database:</p>
<p style="text-align: center;"><img src="http://www.pedroinnecco.com/files/crm_address-issue_02.png" alt="" title="Accounts address list table" width="612" height="98" class="aligncenter size-full wp-image-1171" /></p>
<p>If we add fields for every possible subdivision we want to use, we will end up with a a plethora of unused fields for every account record we have. From the example above, although ACME is a company based in Germany (a country with federal states), even though we only need to use the state field for this account, the account record still has the fields for all other possible subdivisions we created (cantons, departments etc).</p>
<p>From an technical perspective this is a mess which would make database designers and technical architects twitch their face with disgust. But from the end-user perspective this could also be a nightmare for reports, mail merge and other tasks that rely around data manipulation of account records.</p>
<p>If you still doubt this is a bad idea, then consider countries that have more than just one type of subdivision. In the United Kingdom for instance, England has 27 two-tier counties, 32 London boroughs, 36 metropolitan districts, 55 unitary authorities and 1 city corporation. Northern Ireland has 26 districts. Scotland has 32 council areas and Wales has 22 unitary authorities. Following the logic of creating a field for each subdivision (and being finicky about it), shouldn&#8217;t we create a field for each of these possible subdivisions? And for the record, the UK is far from being an exception. There are several other countries (Russia being another example) that has more than one type of constituent entity.  </p>
<p>If this was really an issue, every single logistics company out there would be in shambles. Your FedEx post for London England would end-up in the Faroe Islands, or the Amazon order you placed to be delivered in Moscow would end up in Guam. How come these companies are still standing?</p>
<h2>Recommendations</h2>
<p>My solution is plain simple. When adding addresses, consider the <strong>State/Province</strong> field the top-level constituent entity, regardless if for the address in question is for a state, province, department, canton, oblast or emirate. The City field should then be used by city, town or village.</p>
<h3>It is just a label</h3>
<p>With a little bit of common sense a user will understand that when filling an address, Bern being a Swiss Canton and therefore the top-level constituent entity of A Swiss address, should be filled in the <strong>State/Province</strong> field. However if the &#8220;<em>State/Province</em>&#8221; label really bothers you, you could use a JScript bound to the <strong>Country/Region</strong> field to change the &#8220;State/Province&#8221; label according to the selected country/region (this will work best if you <a href="http://www.pedroinnecco.com/?p=491" title="Dynamics CRM: Adding a Country/Region option set using ISO 3166-1" target="_blank">use an option set</a> for the country/region field).</p>
<h3>City field vs State/Province field</h3>
<p>In some cases it might be unnecessary to have both City and State/Province fields filled in. The first question you address is what sort of address information should be included in correspondences to this address.</p>
<p>This is often the case in the UK since only the address along with the city (or town, or village) is required along with the post code. For example when filling an address for London, typing London as the city should suffice for postal records. However, the second question you also need to consider is if State/Province is required for any of your business processes such as workflows, or reports. If that is the case then again the solution relies on common sense, and also some user training. Some solutions could be:</p>
<ul>
<li>Type <em>London</em> for both City and State/Region</li>
<li>Type the London Borough (or City of London) in City, and <em>London</em> in State/Province</li>
</ul>
<p>Keep in mind the following: When filling addresses, having extra information is better than missing information. One might think it is irrelevant to capture both <em>Gloucester</em> in the City field and <em>Goucestershire</em> in the State/Province field and that such address label would look unsightly. However when dealing with databases I rather have consistency over aesthetics. An address label is the means to an end and it is likely that it will end up in the bin as soon as the letter received the its recipient. </p>
<h3>Beware of the County field</h3>
<p>Dynamics CRM does provide a county field (not used by default) for the several entities with address-related fields (e.g.: Accounts, Contacts, Competitors, etc). However, unless your are planning to use Dynamics CRM only with countries or regions that has counties as their constituent entities, I strongly suggest you NOT to use for the previously mentioned reasons.</p>
<p>Another option would be that when filling an address of a country/region with county constituencies, we sync the value of the <strong>County</strong> and the <strong>State/Province</strong> fields through the use of a workflow or JScript (in such case, one of these fields would be hidden in the entity form).</p>
<p>In some exceptional cases a country/region can have counties not as their top level constituent entity. The Republic of Ireland is a good example, where its top level constituency of &#8220;Province&#8221; is subdivided into counties (see <a href="http://en.wikipedia.org/wiki/ISO_3166-2:IE" title="Wikipedia article about ISO 3166-2 for the Republic of Ireland" target="_blank">ISO 3166-2:IE</a>). However in Ireland&#8217;s case nobody uses provinces for address purposes. But in some cases provinces might be required for reporting, business processes (such as workflows) or integration with other systems. so a combination of both <strong>County</strong> and <strong>State/Province</strong> fields might be required. Again, it is all about common sense and data integrity.</p>
<h2>Final thoughts</h2>
<p>The idea of this post is to give some guidance when customising Dynamics CRM around business requirements that might arise for capturing address information. It is important that such requirements are realistic considering the advantages and limitations of computer science, which is: computers think through binary operations; not as humans do! Therefore there must be a compromise between usability and system architecture in order to avoid bad data. Bottom line; it is all about common sense.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2012/01/dynamics-crm-considerations-when-customising-address-fields/' addthis:title='Dynamics CRM: Considerations when customising address fields '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2012/01/dynamics-crm-considerations-when-customising-address-fields/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dynamics CRM: Diving into the sales pipeline – Part 3</title>
		<link>http://www.pedroinnecco.com/2011/10/dynamics-crm-sales-pipeline-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dynamics-crm-sales-pipeline-3</link>
		<comments>http://www.pedroinnecco.com/2011/10/dynamics-crm-sales-pipeline-3/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 10:39:09 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[sales pipeline]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=971</guid>
		<description><![CDATA[In my previous post of this series we discussed how to apply our previously defined sales pipeline through the customisation of the Opportunity entity form. We went through the design [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.pedroinnecco.com/?p=880" title="Dynamics CRM: Diving into the sales pipeline - Part 2">In my previous post of this series</a> we discussed how to apply our previously defined sales pipeline through the customisation of the Opportunity entity form. We went through the design of the Opportunity form, which included the addition of fields built-in fields which aren&#8217;t part of the default form, and we added some scripts for the calculation of our probability matrix.</p>
<p>In this final post we will go through the creation of some workflows that will be part of our sales pipeline process.<span id="more-971"></span></p>
<h2>Overview of the processes</h2>
<p>We are going to create three workflows for the Opportunity entity. One of these workflows, the main one entitled <em>Sales Process</em>, will be triggered with the creation of an opportunity. This workflow is the one which the Sales Pipeline report will use for the sales pipeline phases. The second workflow entitled <em>Sales Process &#8211; Post Mortem</em> is a child process, which will be called by the main <em>Sales Process</em> workflow when the opportunity is marked as lost or won. Finally, the third workflow entitled <em>Sales Process &#8211; Reopen of Opportunity</em> will be triggered only when an opportunity is reopened (that is, it status changes from closed to open).</p>
<p>So let&#8217;s start by adding the first workflow. I assume you&#8217;re already logged into Dynamics CRM through an account that has administrative or customisation privileges.</p>
<h2>Sales Process workflow</h2>
<p>As mentioned in a previous post of this series, the default Sales Pipeline report that comes with Dynamics CRM relies on a workflow of the Opportunity entity to show the different stages of the Sales Pipeline. Therefore we are going to create a workflow for this purpose with the same stages of our sales pipeline as we did to customise the Opportunity form in my previous post.</p>
<p>All that this workflow is going to do is to move through its stages as the sales process progresses so the Sales Pipeline report can make use of it. However, you might as well add your own actions to the stages of this workflow if you wish to do so.</p>
<ol>
<li>Add a new blank process of the category workflow for the entity Opportunity entitled <code>Sales Process</code>:</br><br />
Process name: <code>Sales Process</code><br />
Entity: <code>Opportunity</code><br />
Category: <code>Workflow</code><br />
Type: <code>New blank process</code></br><br />
Click on <strong>OK</strong> to confirm your settings and load the workflow design window.</li>
<p class="infobox"><strong>Note on naming workflows:</strong> It doesn&#8217;t matter what name you give to your workfow and you can also rename and modify workflows at a latter stage if you want. However, in order for a workflow to work it must be activated, and activated workflows can&#8217;t be modified. If you wish to modify a workflow at a latter stage, whether to change its name or to modify its actions, you will have to deactivate the workflow.</p>
<li>In the workflow design window under the <strong>General</strong> tab, make sure you set the process properties as follows:<br/><br />
<table>
<tr>
<td><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_01.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_01-300x120.png" alt="Process Name: Sales Process; Activate As: Process; Available to Run: As a child process; Scope: Organization; Start when: Record is created" title="Sales Process workflow: Properties" width="300" height="120" class="alignleft size-medium wp-image-1043" /></a></td>
<td>Process Name: Sales Process<br />
Activate As: <code>Process</code><br />
Available to Run: <code>As a child process</code><br />
Scope: <code>Organization</code><br />
Start when: <code>Record is created</code></td>
</tr>
</table>
</li>
<li>Next we will start adding the stages of the workflow. Click on <strong>Add Step</strong> and select <strong>Stage</strong> and name the first stage <code>1 - Prospect</code>. Repeat these steps to add two more stages: <code>2 - Proposal</code> and <code>3 - Negotiation</code>.</li>
<p class="infobox"><strong>Descriptions:</strong> Dynamics CRM allow you to provide a description for every stage and action in your workflow. I will not be telling you what descriptions to type since this is irrelevant for the workflow to work. However, you can refer to the screenshots below as they show the descriptions I have provided for the stages and actions.</p>
<p>Now under each stage we must add a wait condition with a parallel wait branch. The idea is that the workflow is waiting either for the opportunity to move to the next stage, or for the opportunity to close. If the Process Code field (which is &#8220;disguised&#8221; as the Pipeline Phase field in the form) changes to the next option, then the workflow will move to the next phase. Otherwise, if the opportunity record is closed as lost or won, then call the Sales Process &#8211; Post Mortem workflow to deal with the closed opportunity, and stop the workflow.</p>
<li>Under the first stage (1 &#8211; Prospect), select the line that says <strong>Select this row and click Add Step</strong>. Click on <strong>Add Step</strong> and select <strong>Wait Condition</strong>.</li>
<li>Click where it says <strong><condition> (click to configure)</strong> and set the condition as: <code>Opportunity:Proccess Code equals [2 - Proposal]</code>.</li>
<li>Repeat the two previous steps (4 and 5) for the second stage. However, make sure that for this stage we are waiting for the condition <code>Opportunity:Process Code equals [3 - Negotiation]</code>.</li>
<li>Under the third and last stage will add a wait condition just as we did for the other two previous steps. However this time we want to configure the waiting condition to be <code>Opportunity:Status equals [Lost;Won]</code>.</li>
<p><br/>We should now have the steps configured for our workflow as the following screenshot:</p>
<p style="text-align: center;"><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_01b.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_01b-300x115.png" alt="" title="Sales Process workflow: Design (partial)" width="300" height="115" class="alignnone size-medium wp-image-1044" /></a></p>
<p>The workflow as it is will move through the stages as the Opportunity&#8217;s Process Code field (again, which is &#8220;disguised&#8221; as Pipeline Phase field in the form) is updated. However, what if the opportunity is closed? For that we must account for other conditions. Our next step will be to create the workflow that will be called by this workflow when the opportunity closes.</p>
<li>For now, click on <strong>Save and Close</strong> so we can proceed to design our next workflow. We will come back to this workflow afterwards to add the required parallel wait branches.</li>
</ol>
<h2>Sales Process &#8211; Post Mortem workflow</h2>
<p>This next workflow is pretty straightforward. We are going to create a child workflow which will be called by our main Sales Process workflow when an opportunity is either lost or canceled, and perform given actions accordingly.</p>
<ol>
<li>Add a new blank process of the category workflow for the entity Opportunity entitled <code>Sales Process - Post Mortem</code>:</br><br />
Process name: <code>Sales Process - Post Mortem</code><br />
Entity: <code>Opportunity</code><br />
Category: <code>Workflow</code><br />
Type: <code>New blank process</code></br><br />
Click on <strong>OK</strong> to confirm your settings and load the workflow design window.</li>
<li>In the workflow design window under the <strong>General</strong> tab, make sure you set the process properties as follows:<br/><br />
<table>
<tr>
<td><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_02.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_02-300x120.png" alt="Process Name: Sales Process - Post Mortem; Activate As: Process; Available to Run: As a child process; Scope: Organization" title="Sales Process - Post Mortem: Properties" width="300" height="120" class="alignleft size-medium wp-image-1046" /></a></td>
<td>Process Name: Sales Process<br />
Activate As: <code>Process</code><br />
Available to Run: <code>As a child process</code><br />
Scope: <code>Organization</code><br />
Start when: <code>Record is created</code></td>
</tr>
</table>
</li>
<li>Next we will design the workflow as per the screenshot below. Click on <strong>Add Step</strong> and select <strong>Stage</strong> and name the stage <code>X - Post Mortem</code>. <strong>Note:</strong> We are just adding this stage for consistency, since this workflow doesn&#8217;t require stages.</li>
<li>Select the line that says <strong>Select this row and click Add Step</strong>. Click on <strong>Add Step</strong> and select <strong>Check Condition</strong>.</li>
<li>Click where it says <strong>(click to configure)</strong> and set the condition as: <code>Opportunity:Status equals [Lost]</code>.</li>
<li>Click on the next line where it says <strong>Select this row and click Add Step</strong>. Click on <strong>Add Step</strong> and select <strong>Update Record</strong>. Make sure that where it says <strong>Update</strong> the <strong>Opportunity</strong> entity (the primary entity) is selected, and click on <strong>Set Properties</strong>. In the form, click on the <strong>Probability (%)</strong> field and type <code>0</code>, then click on <strong>Save and Close</strong> to return to the workflow designer.</li>
<p class="infobox"><strong>Editing read-only fields:</strong> If you remember from the previous post in the series, the <strong>Probability (%)</strong> field has been set as read-only when customising the Opportunity form. We will need to temporarily remove the read-only restriction of the Probability field and re-publish our customisation in order to be able to specify values for this field.</p>
<li>Back at the workflow designer, make sure that the last step we added is selected (the one that updates the Opportunity&#8217;s probability) then click on <strong>Add Step</strong> and select <strong>Stop Workflow</strong>. Make sure that where it says <strong>Stop workflow with status of</strong> the option <strong> Succeeded </strong> is selected.</li>
<li>Now click on the line that says <strong>If Opportunity:Status equals [Lost]</strong> in order to select the whole condition. Click on <strong>Add Step</strong> and select <strong>Conditional Branch</strong>.</li>
<li>At the line that says <strong>Otherwise</strong>, click where it says <strong>(click to configure)</strong> and set the condition as: <code>Opportunity:Status equals [Won]</code>.</li>
<li>Repeat the same steps as step 6 above. However, this time when setting the properties in the form, type <code>100</code> in the <strong> Probability (%)</strong> field.</li>
<li>Finally, repeat the same steps as step 7 above.</li>
<p><br/>We should now have the steps configured for our workflow as the following screenshot:</p>
<p style="text-align: center;"><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_02b.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_02b-300x126.png" alt="" title="Sales Process - Post Mortem workflow: Design" width="300" height="126" class="alignnone size-medium wp-image-1047" /></a></p>
<li>Click on <strong>Save and Close</strong> so we can proceed to update the previous workflow.</li>
</ol>
<h2>Sales Process workflow &#8211; revisited</h2>
<p>Now we must update our Sales Process workflow so it can trigger the Sales Process &#8211; Post Mortem workflow we just created when an opportunity is closed. SO lets proceed to edit the Sales Process workflow.</p>
<ol>
<li>Under the first stage (1 &#8211; Prospect), click on the line that says <strong>Wait until</strong> in order to select the whole condition. Click on <strong>Add Step</strong> and select <strong>Parallel Wait Branch</strong>.</li>
<li>At the line that says <strong>Otherwise</strong>, click where it says <strong>(click to configure)</strong> and set the condition as: <code>Opportunity:Status equals [Lost;Won]</code>.</li>
<li>Click on the next line where it says <strong>Select this row and click Add Step</strong>. Click on <strong>Add Step</strong> and select <strong>Start Child Workflow</strong>. Make sure that where it says <strong>Start child workflow</strong> the Opportunity entity (the primary entity) is selected, and then select the <code>Sales Process - Post Mortem</code> workflow in the lookup field.</strong>
<li>Make sure that the last step we added is selected (the one that starts the child workflow) then click on <strong>Add Step</strong> and select <strong>Stop Workflow</strong>. Make sure that where it says <strong>Stop workflow with status of</strong> the option <strong> Succeeded </strong> is selected.</li>
<li>Repeat all previous steps (steps 1-4) for the second stage. Leave the last stage as it is.</li>
<p><br/>We should now have the steps configured for our workflow as the following screenshot:</p>
<p style="text-align: center;"><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_01c.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_01c-300x229.png" alt="" title="Post Mortem workflow: Design (revisited)" width="300" height="229" class="alignnone size-medium wp-image-1045" /></a></p>
<p>The workflow now will move through the stages as the Opportunity&#8217;s Process Code field (again, which is &#8220;disguised&#8221; as Pipeline Phase field in the form) is updated. If the opportunity is closed (either lost or won) the workflow will call the Sales Process &#8211; Post Mortem workflow and stop the workflow as successful.</p>
<p class="infobox"><strong>Actions:</strong> You might have noticed that at each stage of our workflow, all that we do is wait we have added no actions to take place. The idea of this workflow is simply to support the Sales Pipeline report and introduce the design of workflows in the process. Feel free to add your own actions to these workflows if you wish to do.</p>
<li>Click on <strong>Save and Close</strong> so we can proceed to create our last workflow.</li>
</ol>
<p>Now consider this: The Sales Process workflow follows the life-cycle of an opportunity from the moment it is created. However, what would happen if a user re-opens an opportunity record? At the moment, nothing would happen. But we can create one final workflow to cover this scenario.</p>
<h2>Sales Process &#8211; Reopen of Opportunity</h2>
<p>This final workflow will be triggered when an opportunity status is changed. If the status is changed to open (i.e.: the opportunity is re-opened), then the Sales Process workflow will be called. Otherwise, the workflow will stop as succeeded.</p>
<ol>
<li>Add a new blank process of the category workflow for the entity Opportunity entitled Sales Process – Reopen of Opportunity:</br><br />
Process name: <code>Sales Process - Reopen of Opportunity</code><br />
Entity: <code>Opportunity</code><br />
Category: <code>Workflow</code><br />
Type: <code>New blank process</code></br><br />
Click on <strong>OK</strong> to confirm your settings and load the workflow design window.</li>
<li>In the workflow design window under the <strong>General</strong> tab, make sure you set the process properties as follows:<br/><br />
<table>
<tr>
<td><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_03.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_03-300x120.png" alt="" title="Sales Process - Reopen of Opportunity: Properties" width="300" height="120" class="alignleft size-medium wp-image-1048" /></a></td>
<td>Process Name:  <code>Sales Process - Reopen of Opportunity</code><br />
Activate As: <code>Process</code><br />
Available to Run: <code>no option selected</code><br />
Scope: <code>Organization</code><br />
Start when: <code>Record status changes</code></td>
</tr>
</table>
</li>
<li> Click on <strong>Add Step</strong> and select <strong>Check Condition</strong>.</li>
<li>Click where it says <strong>(click to configure)</strong> and set the condition as: <code>Opportunity:Status equals [Open]</code>.</li>
<li>Click on the next line where it says <strong>Select this row and click Add Step</strong>. Click on <strong>Add Step</strong> and select <strong>Update Record</strong>. Make sure that where it says <strong>Update</strong> the <strong>Opportunity</strong> entity (the primary entity) is selected, and click on <strong>Set Properties</strong>. In the form, click on the <strong>Probability (%)</strong> field and type <code>5</code>, for the <strong>Rating</strong> field select <code>Cold</code> and for the <strong>Process Code</strong> field select <code>1 - Prospect</code> then click on <strong>Save and Close</strong> to return to the workflow designer.</li>
<li>Back at the workflow designer, make sure that the last step we added is selected (the one that updates the opportunity&#8217;s probability, rating and process code) then click on <strong>Add Step</strong> and select <strong>Start Child Workflow</strong>. Make sure that where it says <strong>Start child workflow</strong> the Opportunity entity (the primary entity) is selected, and then select the <code>Sales Process</code> workflow in the lookup field.</li>
<li>Make sure that the last step we added is selected (the one that starts the child workflow) then click on <strong>Add Step</strong> and select <strong>Stop Workflow</strong>. Make sure that where it says <strong>Stop workflow with status of</strong> the option <strong>Succeeded</strong> is selected.</li>
<li>Now click on the line that says <strong>If Opportunity:Status equals [Open]</strong> in order to select the whole condition. Click on <strong>Add Step</strong> and select <strong>Default Action</strong>.</li>
<li>Under <strong>Otherwise</strong> select the line that says <strong>Select this row and click Add Step</strong>. Click on <strong>Add Step</strong> and select <strong>Stop Workflow</strong>. Make sure that where it says <strong>Stop workflow with status of</strong> the option <strong>Succeeded</strong> is selected.</li>
<p><br/>We should now have the steps configured for our workflow as the following screenshot:</p>
<p style="text-align: center;"><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_03b.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_03b-300x126.png" alt="" title="Sales Process - Reopen of Opportunity: Design" width="300" height="126" class="alignnone size-medium wp-image-1049" /></a></p>
<li>Click on <strong>Save and Close</strong> so we can proceed to activate our workflows.</li>
</ol>
<h2>Activating and testing the workflows</h2>
<p>After saving and publishing our workflows, our next step is to activate our workflows so we can test them.</p>
<ol>
<li>After activating the workflows, proceed to create an opportunity and save it without closing it.</li>
<li>If you click on <strong>Workflows</strong> under <strong>Procecces</strong> at the left-hand side navigation pane in the Opportunity form, you will be able to see the associated Sales Process workflow which has been triggered upon the creation of this Opportunity record.</li>
<li>Go back to the <strong>General</strong> tab of the Opportunity form and change the <strong>Pipeline Phase</strong> from <code>1 - Prospect</code> to <code>2 - Proposal</code>. Now if you go back to the associated workflow view (see previous step) and click on the Sales Process workflow, you can see its progress.</li>
<p style="text-align: center;"><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_04.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_04-300x204.png" alt="" title="Sales Process: workflow progress" width="300" height="204" class="alignnone size-medium wp-image-1086" /></a></p>
<p class="warnbox"><strong>Workflow stages:</strong> Unfortunately Dynamics CRM 2011 workflow designer only allow a linear and sequential progression through the stages of a workflow. In practical terms, this means that from Stage 1 we can only progress to Stage 2, from Stage 2 to Stage 3 and so forth; and we can&#8217;t jump a stage or go backwards on stages. This is why we added the bonus JScript in the previous post of the series to enforce users to follow a linear and sequential progression. If you want to create a workflow that allow jumping back and forth through its stages, you will have do design the workflow using Visual Studio.</p>
<li>Now proceed to view all of the open opportunities. At the Ribbon, click on <strong>Run Report</strong> and select the <strong>Sales Pipeline</strong> report. When prompted to select records, select <strong>All applicable records</strong> then click on <strong>Run Report</strong>.</li>
<li>When the report finish to load, at the top where it says <strong>Group by Sales Process</strong> select <code>Sales Process</code> (the name of our workflow) from the drop-down. Where it says <strong>Group By</strong> select <code>Sales Stage</code>. Then click on <strong>View Report</strong> to update the report. We should now see the opportunities estimated revenue grouped by the sale stages.</li>
<p style="text-align: center;"><a href="http://www.pedroinnecco.com/files/crm_sales-pipeline3_04b.png"><img src="http://www.pedroinnecco.com/files/crm_sales-pipeline3_04b-300x231.png" alt="" title="Sales Pipeline Report" width="300" height="231" class="alignnone size-medium wp-image-1092" /></a></p>
<p>The report takes the sale stages from the stages of our Sales Process workflow. You might be wondering why couldn&#8217;t this report make use of the same field as the pipeline chart does in the previous post of this series. I asked myself the same question when I first came across this report. However it does make sense to have the report based on the workflow stages and the chart on an entity field; particularly if you have complex workflows and sub-stages for dealing with different products or business units.</ol>
<h2>Wrapping up</h2>
<p>Wow&#8230; That was a lot of writing. Through the course of this series we introduced a lot of concepts for creating a functional sales pipeline in Dynamics CRM 2011. Through the customization of the Opportunity entity we also introduced some useful JScripts which calculate fields and remove options from option sets. Also through the design of workflows we introduced the concepts of conditionals, waits and branches; as well the use of child workflows. I hope you enjoyed this series and that it can be a useful reference for those in the Dynamics CRM community. Thank you for stopping by!</p>
<h2>Bonus: Challenge yourself</h2>
<p class="helpbox"><strong>Update Jan/2012:</strong> Because the sales pipeline is only about open opportunities, we only covered the open stages of the opportunity in this series of posts (1 &#8211; Prospect, 2 &#8211; Proposal, 3 &#8211; Negotiation). However, let&#8217;s say that for consistency we would also like the Pipeline Phase field of a closed opportunity to show either &#8220;4 &#8211; Won&#8221; or &#8220;X &#8211; Lost&#8221;, in case someone opens the form of a closed opportunity record. How could we do that?</p>
<p>This can easily be done with by adapting our workflow to change the value of the <strong>Pipeline Phase</strong> (<code>stepname</code>) accordingly for when an opportunity is closed either as won or as lost. As for our <strong>Process Code</strong> (<code>salesstagecode</code>) field labeled as Pipeline Phase, we can either adapt our JScript to hide it when a form is closed (using<code>CRM_FORM_TYPE == 4</code>) so users would only see the <strong>Pipeline Phase</strong>  (<code>stepname</code>) in the form footer. Alternatively, we can add two additional options to the <strong>Process Code</strong> (<code>salesstagecode</code>) and have them always hidden from the end-user in an editable form by adapting the bonus JScript proposed in the previous post. Then the workflow would update the value of the <strong>Process Code</strong> option set according to the close status of the opportunity (either as won or as lost).</p>
<p>Have fun!</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2011/10/dynamics-crm-sales-pipeline-3/' addthis:title='Dynamics CRM: Diving into the sales pipeline – Part 3 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2011/10/dynamics-crm-sales-pipeline-3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Dynamics CRM: Diving into the sales pipeline – Part 2</title>
		<link>http://www.pedroinnecco.com/2011/10/dynamics-crm-sales-pipeline-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dynamics-crm-sales-pipeline-2</link>
		<comments>http://www.pedroinnecco.com/2011/10/dynamics-crm-sales-pipeline-2/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 15:16:45 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[sales pipeline]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=880</guid>
		<description><![CDATA[In my previous post of this series, we discussed some fundamental concepts of the sales pipeline and how Dynamics CRM handles the sales process. While considering the requirements of ACME [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.pedroinnecco.com/?p=413" title="Dynamics CRM: Diving into the sales pipeline – Part 1">my previous post of this series</a>, we discussed some fundamental concepts of the sales pipeline and how Dynamics CRM handles the sales process. While considering the requirements of ACME (a fictitious company), we defined the stages of their sales pipeline, and started to outline the functional specification of the opportunity entity, including the elaboration of an opportunity probability matrix.</p>
<p>In this post we will discuss how to apply what have been defined so far by covering the customisation of the Opportunity entity form, including some scripting.<span id="more-880"></span></p>
<p>So let&#8217;s start by customising the Opportunity form.</p>
<h2>Opportunity form: Adding and editing fields</h2>
<ol>
<li>Add the <strong>Process Code</strong> field (<code>salesstagecode</code>) above the <strong>Rating</strong> field (<code>opportunityratingcode</code>).</li>
<li>Edit the Process Code field properties. Under <strong>Display</strong>, change the field label to <code>Pipeline Phase</code>.</li>
<li>Now under <strong>Details</strong>, click on Edit to add the Pipeline Phase stages as options into the option set field, remembering the caveats concerning naming and numbering the pipeline phases we mentioned in the previous post. As per the previous post, we should add the following options:<br/><br />
<code>1 - Prospect<br />
2 - Proposal<br />
3 - Negotiation</code><br/><br />
Make sure to save and close the properties dialog for the Process Code field.</li>
<li>Back at the Opportunity form under Forecast Information, make the <strong>Probability</strong> field (<code>closeprobability</code>) read-only.</li>
<li>Add the <strong>Pipeline Phase</strong> field (<code>stepname</code>) just under the Probability field, which is the field used by the <em>Sales Pipeline Funnel Chart</em>. Change the properties of the field and make sure that under <strong>Visibility</strong>, the field is <strong>not</strong> selected as visible by default.</li>
</ol>
<p style="text-align: center;"><img src="http://www.pedroinnecco.com/files/crm2011_sales-pipeline2_01.png" alt="" title="Opportunity form: Forecast Information section" width="546" height="194" class="aligncenter size-full wp-image-911" /></p>
<p class="infobox"><strong>Our Goal: </strong>What we are going to achieve here is that using the Process Code field labeled (i.e.: &#8220;disguised&#8221;) as the Pipeline Phase field, users will be able to manualy select the Pipeline Phase in which the opportunity is at. The label of the option selected in this field will then be copied into the real Pipeline Phase field, which we just added as hidden in the form. Furthermore, we made the Probability field readonly because its value will be automatically calculated based on the combination of values from the Pipeline Phase and Rating fields, following our probability matrix we defined in the previous post.</p>
<h2>Adding our JScript: Creating the web resource</h2>
<p>In order to achieve the goal mentioned above, we must add some code that will work with the customisation we did so far.</p>
<ol>
<li>Create a new JScript web resource and name it <code><span style="color: #0000ff;">new_</span>SalesPipeline</code>.</li>
<li>Add the following code into the web resource:</li>
<pre class="brush: jscript; title: ; notranslate">
SalesPipelineProbCalc = function() {
  var CRM_FORM_TYPE = Xrm.Page.ui.getFormType();
  if (CRM_FORM_TYPE != 4) {

	// Get value of Pipeline Phase set by user
	if (Xrm.Page.getAttribute(&quot;salesstagecode&quot;).getSelectedOption() != null)
	{var val_salesstagecode = Xrm.Page.getAttribute(&quot;salesstagecode&quot;).getSelectedOption().value;}
	else {var val_salesstagecode = null;}

	// Get text of Pipeline Phase set by user (this text should be the same for all languages)
	if (Xrm.Page.getAttribute(&quot;salesstagecode&quot;).getSelectedOption() != null)
	{var txt_salesstagecode = Xrm.Page.getAttribute(&quot;salesstagecode&quot;).getSelectedOption().text;}
	else {var txt_salesstagecode = null;}

	 // Set the text of Pipeline Phase field
	Xrm.Page.getAttribute(&quot;stepname&quot;).setValue(txt_salesstagecode);

	// Set the submition mode of closeprobability (which is set as read-only) in order to commit the value when saving the record
	var closeprobabilityAttr = Xrm.Page.getAttribute(&quot;closeprobability&quot;);
	closeprobabilityAttr.setSubmitMode(&quot;always&quot;);

	// Get value of the Rating selected by user
	if (Xrm.Page.getAttribute(&quot;opportunityratingcode&quot;).getSelectedOption() != null)
	{var val_rating = Xrm.Page.getAttribute(&quot;opportunityratingcode&quot;).getSelectedOption().value;}
	else {var val_rating = null;}

	// Calculation of Close Probability Rating as per Phase X Rate matrix
	if (val_salesstagecode == 1 &amp;&amp; val_rating == 3)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(10); }
	else if (val_salesstagecode == 1 &amp;&amp; val_rating == 2)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(25); }
	else if (val_salesstagecode == 1 &amp;&amp; val_rating == 1)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(50); }
	else if (val_salesstagecode == 2 &amp;&amp; val_rating == 3)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(20); }
	else if (val_salesstagecode == 2 &amp;&amp; val_rating == 2)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(50); }
	else if (val_salesstagecode == 2 &amp;&amp; val_rating == 1)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(75); }
	else if (val_salesstagecode == 3 &amp;&amp; val_rating == 3)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(40); }
	else if (val_salesstagecode == 3 &amp;&amp; val_rating == 2)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(75); }
	else if (val_salesstagecode == 3 &amp;&amp; val_rating == 1)
	{ Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(95); }
	else { Xrm.Page.getAttribute(&quot;closeprobability&quot;).setValue(0); }
  }

}
</pre>
<li>Save your changes and make sure to publish the customisation.</li>
</ol>
<p class="warnbox"><strong>A warning on pipeline phases:</strong> At the moment, users can move both forward and backwards in the sales pipeline stages without any limitations. For instance, a user could jump from step 1 to 3, or move backwards from step 2 to 1. There are two issues with at hand. First, I personally don&#8217;t think an opportunity can go backwards; it can either go forward or be cancelled/lost. Second, the Sales Pipeline report is based on steps within a workflow that we&#8217;re yet to create (which we will cover in my next post), and workflows created within Dynamics CRM doesn&#8217;t allow us to jump backward on steps.<br/><br />
A workaround would be to add a JScript that prevent users from moving backward on the pipeline phases. See the &#8220;bonus JScript&#8221; section below for further information.</p>
<h2>Opportunity form: Binding JScript into form and fields</h2>
<p>Now that we added our JScript as a web resource, we must bind it into the Opportunity form and into field events to ensure the calculation will take place when the user changes the correspondent values within the form. So let&#8217;s go back to customise the Opportunity form.</p>
<ol>
<li>Click the <strong>Form Properties</strong> button located in the Ribbon. In the Form Properties dialog under the <strong>Events</strong> tab,  click on <strong>Add</strong> under the <strong>Forms Libraries</strong> section and select the <code><span style="color: #0000ff;">new_</span>SalesPipeline</code> web resource we created previously. Then close the Form Properties.</li>
<li>Double click on the <strong>Process Code</strong> field (which we labeled Pipeline Phase) in order to bring its properties. In the Field Properties dialog under the <strong>Events</strong> tab,  click on <strong>Add</strong> under the <strong>Event Handlers</strong> section.
<li>On the Handler Properties dialog, where it says <strong>Function</strong>, type in <code>SalesPipelineProbCalc</code>, which is the name of the function we created in the <code><span style="color: #0000ff;">new_</span>SalesPipeline</code> web resource. Then click on OK, then OK again in the previous dialog to confirm our customisation.</i>
<li>Repeat the two previous steps (2, and 3) for the <code>Rating</code> field.</li>
<li>Save the form and publish the customisation.</li>
</ol>
<p class="infobox"><strong>What we just did:</strong> We have now added the JScript library we created (i.e.: the JScript web resource) into the Opportunity form and bound the SalesPipelineProbCal into the onChange event for the Process Code (&#8220;disguised&#8221; as Pipeline Phase) and Rating fields. So when the user changes the value of either one of these fields, the value within the Probability field will change accordingly as per the Probability Matrix we defined previously.<br/><br />
<strong>onLoad Form:</strong> We could have also added this function to the form&#8217;s onLoad event. This means that as soon as the form loads, the script will be executed. The script contains a conditional at the top that checks if the form isn&#8217;t read-only (e.g.: if viewing a closed opportunity) in order to execute the calculation.</strong> </p>
<h2>Testing our solution</h2>
<p>When can now go ahead and test our solution by creating an opportunity. We can manually specify the pipeline phase in which the opportunity is at, and this will reflect in the Pipeline Funnel chart. We can also give our opportunity the rating of <em>hot</em>, <em>warm</em> or <em>cold</em>, and along with the pipeline phase selected, the system will automatically calculate the probability for closing the opportunity.</p>
<h2>Bonus JScript: Filtering option set values</h2>
<p>In order to prevent users from jumping backward or skipping phases from the sales pipeline, we can filter the options available within the <strong>Pipeline Phase</strong> option set based on the current value with a simple JScript:</p>
<pre class="brush: jscript; title: ; notranslate">
SalesPipelineOptFilter = function() {
  var CRM_FORM_TYPE = Xrm.Page.ui.getFormType();
  if (CRM_FORM_TYPE != 4) {

	// Get value of Pipeline Phase set by user
	if (Xrm.Page.getAttribute(&quot;salesstagecode&quot;).getSelectedOption() != null)
	{var val_salesstagecode = Xrm.Page.getAttribute(&quot;salesstagecode&quot;).getSelectedOption().value;}
	else {var val_salesstagecode = null;}

	if (val_salesstagecode == 1)
	{ Xrm.Page.getControl(&quot;salesstagecode&quot;).removeOption(3); }

	else if (val_salesstagecode == 2)
	{ Xrm.Page.getControl(&quot;salesstagecode&quot;).removeOption(1); }

	else if (val_salesstagecode == 3)
	{
	Xrm.Page.getControl(&quot;salesstagecode&quot;).removeOption(1);
	Xrm.Page.getControl(&quot;salesstagecode&quot;).removeOption(2);
	}

  }
}
</pre>
<p>Make sure you add this JScript on the <strong>onLoad</strong> event of the form as well as in the <strong>onChange</strong> event of the <strong>Process Code</strong> field (<code>salesstagecode</code>) field (labeled as Pipeline Phase in our customised form).</p>
<h2>Coming up next: Creating a workflow</h2>
<p><a href="http://www.pedroinnecco.com/?p=971" title="Dynamics CRM: Diving into the sales pipeline - Part 3">In my next post</a> we will be discussing how to create workflows to support our customisation. This is important if we want to use the default Sales Pipeline report that comes with Dynamics CRM.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2011/10/dynamics-crm-sales-pipeline-2/' addthis:title='Dynamics CRM: Diving into the sales pipeline – Part 2 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2011/10/dynamics-crm-sales-pipeline-2/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Steve Jobs: 1955-2011</title>
		<link>http://www.pedroinnecco.com/2011/10/steve-jobs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=steve-jobs</link>
		<comments>http://www.pedroinnecco.com/2011/10/steve-jobs/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 14:33:50 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Current Affairs]]></category>
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=934</guid>
		<description><![CDATA[I started using Windows 3.0 at the age of 12 and even though I worked with a lot of different systems, from Linux and OS/2 to BSD (and a few [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.pedroinnecco.com/files/apple.jpg" alt="" title="Apple" width="150" height="150" class="alignright size-full wp-image-946" />I started using Windows 3.0 at the age of 12 and even though I worked with a lot of different systems, from Linux and OS/2 to BSD (and a few times, Apple OSes), I have pretty much solidified my profession career with Microsoft products.</p>
<p>I saw Jobs as a difficult man who mistreated his employees, and I never understood his value to the market. That is, until I did my Masters Degree and I was introduced to the concept of industry paradigms.</p>
<p>Regardless of any rivalry feeling one can feel on &#8220;Apple Vs Windows&#8221; subject, Steve Jobs was undeniably a visionary and a <strong>paradigm pioneer</strong> who challenged concepts and developed new markets and trends. Before the iPod, the digital music players were all but a joke, and the iPad succeeded to launch the tablet industry where others previously failed.</p>
<p>The world will be less innovative without him. My sympathies to Apple and his family and friends.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2011/10/steve-jobs/' addthis:title='Steve Jobs: 1955-2011 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2011/10/steve-jobs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>There is no such thing as &#8220;grey mail&#8221;</title>
		<link>http://www.pedroinnecco.com/2011/10/there-is-no-such-thing-as-grey-mail/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=there-is-no-such-thing-as-grey-mail</link>
		<comments>http://www.pedroinnecco.com/2011/10/there-is-no-such-thing-as-grey-mail/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 09:30:11 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Current Affairs]]></category>
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=894</guid>
		<description><![CDATA[I just read today at the Windows Team Blog that Hotmail declares war on greymail. However, I assert that there is not such thing as &#8220;gray mail&#8221;. It doesn&#8217;t matter [...]]]></description>
			<content:encoded><![CDATA[<p>I just read today at the Windows Team Blog that <a href="http://windowsteamblog.com/windows_live/b/windowslive/archive/2011/10/03/hotmail-declares-war-on-graymail.aspx">Hotmail declares war on greymail</a>. However, I assert that there is not such thing as &#8220;gray mail&#8221;.</p>
<p>It doesn&#8217;t matter if it is an email offering me dodgy Rolex replicas or dubious pharmaceuticals, or if it is a newsletter from a major and respectable institution. Any speculative email I receive that I haven&#8217;t explicitly subscribed to, is to be considered SPAM. Enough said.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2011/10/there-is-no-such-thing-as-grey-mail/' addthis:title='There is no such thing as &#8220;grey mail&#8221; '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2011/10/there-is-no-such-thing-as-grey-mail/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Office colour scheme: How to make your customisations look pretty</title>
		<link>http://www.pedroinnecco.com/2011/09/office-colour-scheme/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=office-colour-scheme</link>
		<comments>http://www.pedroinnecco.com/2011/09/office-colour-scheme/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 16:59:32 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=864</guid>
		<description><![CDATA[When customising Dynamics CRM or SharePoint, I often find myself having to meddle with colours. This is particularly the case when I am creating complex charts for Dynamics CRM, or [...]]]></description>
			<content:encoded><![CDATA[<p>When customising Dynamics CRM or SharePoint, I often find myself having to meddle with colours. This is particularly the case when I am creating complex charts for Dynamics CRM, or some KPI dashboard in PerformancePoint. If you want your dashboards, reports and charts to look appealing, you must know how to work with colours.</p>
<p>To find the correct colour combination, however, can be a tedious choir. Particularly when you just want to get it over with. My trick is to use the default Microsoft Office 2007/2010 colour theme as a reference. In order to make this task easier, I created a reference chart with listing the colours along with both RBG (red/blue/green) and hexadecimal values.<span id="more-864"></span></p>

<a href='http://www.pedroinnecco.com/2011/09/office-colour-scheme/mso_theme-colours_01/' title='mso_theme-colours_01'><img width="150" height="150" src="http://www.pedroinnecco.com/files/mso_theme-colours_01-150x150.png" class="attachment-thumbnail" alt="mso_theme-colours_01" title="mso_theme-colours_01" /></a>
<a href='http://www.pedroinnecco.com/2011/09/office-colour-scheme/mso_theme-colours_02/' title='mso_theme-colours_02'><img width="150" height="150" src="http://www.pedroinnecco.com/files/mso_theme-colours_02-150x150.png" class="attachment-thumbnail" alt="mso_theme-colours_02" title="mso_theme-colours_02" /></a>

<p>You can also <a href='http://www.pedroinnecco.com/files/pmdci_Office-Colour-Pallete.pdf'>click here</a> to download a PDF version of the this sheet.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2011/09/office-colour-scheme/' addthis:title='Office colour scheme: How to make your customisations look pretty '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2011/09/office-colour-scheme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamics CRM: Creating a radar chart</title>
		<link>http://www.pedroinnecco.com/2011/09/dynamics-crm-creating-a-radar-chart/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dynamics-crm-creating-a-radar-chart</link>
		<comments>http://www.pedroinnecco.com/2011/09/dynamics-crm-creating-a-radar-chart/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 12:32:36 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[fetchXML]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=841</guid>
		<description><![CDATA[From all of the new features in Dynamics CRM 2011, the one that got me thrilled the most is charts. Dynamics CRM comes with a selection of charts for opportunities, [...]]]></description>
			<content:encoded><![CDATA[<p>From all of the new features in Dynamics CRM 2011, the one that got me thrilled the most is charts. Dynamics CRM comes with a selection of charts for opportunities, leads, accounts and so on. It also allows users to create five different chart types straight from the Dynamics CRM interface: Column, Bar, Line, Pie and Funnel.</p>
<p>However, there is more to charts than it meets the eye. The charts functionality in Dynamics CRM leverages the ASP.NET chart controls, which means that we have at our disposal over 20 different chart types we could use. I decided to put the theory into practice and I created my very first radar chart for Dynamics CRM: Deals Won vs. Deals Lost by Territory.<span id="more-841"></span></p>
<p>In Dynamics CRM, charts are based on a proprietary language query called FetchXML. The chart design tool can be quite handy to design simple charts, without the need to meddle with FetchXML code. However, the design tool only allow the creation of five different chart types (column, bar, line, pie and funnel) and it also doesn&#8217;t allow the creation of charts with multiple series and group-by attributes*. For more complex charts or charts based on other chart types which aren&#8217;t one of the &#8220;canonical fives&#8221; previously mentioned, we must take our design efforts beyond the chart design tool. In this case, we must do some coding in FetchXML.</p>
<p class="infobox"><strong>* Update Roll-Up 5:</strong> With the release of Update Roll-Up 5 9 (see KB <a href="http://support.microsoft.com/kb/2567454" title="Microsoft Support: Update Rollup 5 for Microsoft Dynamics CRM 2011 is available" target="_blank">2567454</a>), Microsoft included enhancements to the chart designer, including multiple series and the ability to create area charts, bringing the number of chart types supported in the designer from five to six.</p>
<p>When viewing charts in Dynamics CRM, we have the option to export the chart definition as a XML file so we can edit it with our favourite text editor (I use <a href="http://www.notepad-plus-plus.org/">Notepad++</a>). We can then upload our modified XML charft definition back into Dynamics CRM.</p>
<p style="text-align: center;"><img src="http://www.pedroinnecco.com/files/crm-radar-chart_01.png" alt="" title="Import/Export chart options in Dynamics CRM 2011" width="425" height="115" class="aligncenter size-full wp-image-842" /></p>
<p>For this exercise, I downloaded the XML definition of two charts which I used as reference: <em>Deals Won vs. Deals Lost By Fiscal Period</em> and <em>Sales Progress by Territory</em>. Based on those two chart definitions, I got enough information to go ahead an create my own chart, and I came up with a radar chart entitled Deals Won vs. Deals Lost By Territory.</p>

<a href='http://www.pedroinnecco.com/2011/09/dynamics-crm-creating-a-radar-chart/crm_radar-chart_02/' title='crm_radar-chart_02'><img width="150" height="150" src="http://www.pedroinnecco.com/files/crm_radar-chart_02-150x150.png" class="attachment-thumbnail" alt="crm_radar-chart_02" title="crm_radar-chart_02" /></a>
<a href='http://www.pedroinnecco.com/2011/09/dynamics-crm-creating-a-radar-chart/crm_radar-chart_03/' title='crm_radar-chart_03'><img width="150" height="150" src="http://www.pedroinnecco.com/files/crm_radar-chart_03-150x150.png" class="attachment-thumbnail" alt="crm_radar-chart_03" title="crm_radar-chart_03" /></a>

<p>Here is the code for this chart. Feel free to give it a try and modify it at will.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;visualization&gt;
  &lt;visualizationid&gt;{8BADBB34-01E6-E011-80C0-00155D18443B}&lt;/visualizationid&gt;
  &lt;name&gt;Deals Won vs. Deals Lost By Territory&lt;/name&gt;
  &lt;description&gt;Shows the amount of revenue for won deals versus lost deals by territories.&lt;/description&gt;
  &lt;primaryentitytypecode&gt;opportunity&lt;/primaryentitytypecode&gt;
  &lt;datadescription&gt;
    &lt;datadefinition&gt;
      &lt;fetchcollection&gt;
        &lt;fetch mapping=&quot;logical&quot; aggregate=&quot;true&quot;&gt;
          &lt;entity name=&quot;opportunity&quot;&gt;
            &lt;link-entity name=&quot;opportunity&quot; from=&quot;opportunityid&quot; to=&quot;opportunityid&quot; link-type=&quot;outer&quot;&gt;
              &lt;attribute alias=&quot;sum_won&quot; name=&quot;actualvalue&quot; aggregate=&quot;sum&quot;&gt;&lt;/attribute&gt;
              &lt;filter&gt;
                &lt;condition attribute=&quot;statecode&quot; operator=&quot;eq&quot; value=&quot;1&quot; /&gt;
              &lt;/filter&gt;
            &lt;/link-entity&gt;
            &lt;link-entity name=&quot;opportunity&quot; from=&quot;opportunityid&quot; to=&quot;opportunityid&quot; link-type=&quot;outer&quot;&gt;
              &lt;attribute alias=&quot;sum_lost&quot; name=&quot;estimatedvalue&quot; aggregate=&quot;sum&quot;&gt;&lt;/attribute&gt;
              &lt;filter&gt;
                &lt;condition attribute=&quot;statecode&quot; operator=&quot;eq&quot; value=&quot;2&quot; /&gt;
              &lt;/filter&gt;
            &lt;/link-entity&gt;
            &lt;link-entity name=&quot;account&quot; from=&quot;accountid&quot; to=&quot;customerid&quot; link-type=&quot;outer&quot;&gt;
              &lt;link-entity name=&quot;territory&quot; from=&quot;territoryid&quot; to=&quot;territoryid&quot; link-type=&quot;outer&quot;&gt;
                &lt;attribute groupby=&quot;true&quot; alias=&quot;groupby_territory&quot; name=&quot;name&quot; /&gt;
              &lt;/link-entity&gt;
            &lt;/link-entity&gt;
          &lt;/entity&gt;
        &lt;/fetch&gt;
      &lt;/fetchcollection&gt;
      &lt;categorycollection&gt;
        &lt;category&gt;
          &lt;measurecollection&gt;
            &lt;measure alias=&quot;sum_won&quot; /&gt;
          &lt;/measurecollection&gt;
          &lt;measurecollection&gt;
            &lt;measure alias=&quot;sum_lost&quot; /&gt;
          &lt;/measurecollection&gt;
        &lt;/category&gt;
      &lt;/categorycollection&gt;
    &lt;/datadefinition&gt;
  &lt;/datadescription&gt;
  &lt;presentationdescription&gt;
   &lt;Chart Palette=&quot;None&quot;&gt;
      &lt;Series&gt;
        &lt;Series ChartType=&quot;radar&quot; Name=&quot;o:opportunity_statecode,1&quot; Color=&quot;149, 189, 66&quot; IsValueShownAsLabel=&quot;False&quot; BackGradientStyle=&quot;TopBottom&quot; BackSecondaryColor=&quot;112, 142, 50&quot; Font=&quot;{0}, 9.5px&quot; LabelForeColor=&quot;59, 59, 59&quot;&gt;
          &lt;SmartLabelStyle Enabled=&quot;True&quot; /&gt;
        &lt;/Series&gt;
        &lt;Series ChartType=&quot;radar&quot; Name=&quot;o:opportunity_statecode,2&quot; Color=&quot;255,124,31&quot; IsValueShownAsLabel=&quot;False&quot; BackGradientStyle=&quot;TopBottom&quot; BackSecondaryColor=&quot;235,98,0&quot; Font=&quot;{0}, 9.5px&quot; LabelForeColor=&quot;59, 59, 59&quot;&gt;
          &lt;SmartLabelStyle Enabled=&quot;True&quot; /&gt;
        &lt;/Series&gt;
      &lt;/Series&gt;
      &lt;ChartAreas&gt;
        &lt;ChartArea BorderColor=&quot;White&quot; BorderDashStyle=&quot;Solid&quot;&gt;
          &lt;AxisY LabelAutoFitMinFontSize=&quot;8&quot; TitleForeColor=&quot;59, 59, 59&quot; TitleFont=&quot;{0}, 10.5px&quot; LineColor=&quot;165, 172, 181&quot;&gt;
            &lt;MajorGrid LineColor=&quot;239, 242, 246&quot; /&gt;
            &lt;MajorTickMark LineColor=&quot;165, 172, 181&quot; /&gt;
            &lt;LabelStyle Font=&quot;{0}, 10.5px&quot; ForeColor=&quot;59, 59, 59&quot; /&gt;
          &lt;/AxisY&gt;
          &lt;AxisX LabelAutoFitMinFontSize=&quot;8&quot; TitleForeColor=&quot;59, 59, 59&quot; TitleFont=&quot;{0}, 10.5px&quot; LineColor=&quot;165, 172, 181&quot;&gt;
            &lt;MajorGrid Enabled=&quot;False&quot; /&gt;
            &lt;MajorTickMark Enabled=&quot;False&quot; /&gt;
            &lt;LabelStyle Font=&quot;{0}, 10.5px&quot; ForeColor=&quot;59, 59, 59&quot; /&gt;
          &lt;/AxisX&gt;
        &lt;/ChartArea&gt;
      &lt;/ChartAreas&gt;
      &lt;Titles&gt;
        &lt;Title Alignment=&quot;TopLeft&quot; DockingOffset=&quot;-3&quot; Font=&quot;{0}, 13px&quot; ForeColor=&quot;0, 0, 0&quot;&gt;&lt;/Title&gt;
      &lt;/Titles&gt;
      &lt;Legends&gt;
        &lt;Legend Alignment=&quot;Center&quot; LegendStyle=&quot;Table&quot; Docking=&quot;Bottom&quot; Font=&quot;{0}, 11px&quot; ForeColor=&quot;59, 59, 59&quot;&gt;&lt;/Legend&gt;
      &lt;/Legends&gt;
    &lt;/Chart&gt;
  &lt;/presentationdescription&gt;
  &lt;isdefault&gt;false&lt;/isdefault&gt;
&lt;/visualization&gt;
</pre>
<p>Copy the above code and paste it into your favourite text editor, then save the file with as an XML file (make sure the file terminates with the <code>.XML</code> extension, and not something else such as <code>MyChart.TXT</code> or <code>MyChart.XML.TXT</code>). Now you can go back to Dynamics and import your XML chart definition file.</p>
<p>Import as a personal chart (only available to you): Navigate to the Opportunity entity by clicking on <strong>Opportunities</strong> at the left-hand side navigation. Then click on <strong>Import Chart</strong> button located in the <strong>Chart</strong> ribbon.</p>
<p>Import as a system chart (available to the whole organisation: Navigate to <strong>Settings</strong>, then <strong>Customizations</strong> and then select <strong>Customize the System</strong>. In the <strong>Default Solution</strong> window that appears, expand <strong>Entities</strong>, then <strong>Opportunity</strong> and select <strong>Charts</strong>. Click on <strong>More Actions</strong> in the menu bar and select <strong>Import Chart</strong> to import your chart definition. Once the file is imported, make sure you click on <strong>Publish All Customizations</strong>.</p>
<p>Hope you can find this chart useful. If you need further information on FetchXML, check out the following recommendations:</p>
<p class="helpbox"><strong>Further information:</strong> The following sites can be of help for those starting with charts in Dynamics CRM 2011:<br/>Microsoft Developer Network: <a href="http://msdn.microsoft.com/en-us/library/gg309405.aspx" target="_blank">Library entry on FetchXML Schema</a><br />
Microsoft Download: <a href="http://www.microsoft.com/download/en/details.aspx?id=11001" title="Download: Microsoft Chart Controls for .NET Framework Documentation" target="_blank">Microsoft Chart Controls for .NET Framework Documentation</a><br />
Microsoft Developer Network: <a href="http://archive.msdn.microsoft.com/mschart" target="_blank">Samples Environment for Microsoft Chart Controls</a><br />
Microsoft Dynamics CRM Blog: <a href="http://blogs.msdn.com/b/crm/archive/2011/01/04/crm-2011-charts-know-the-real-potential-part-i.aspx">CRM 2011 Charts – Know the Real Potential ~ Part I</a><br />
Microsoft Dynamics CRM Blog: <a href="http://blogs.msdn.com/b/crm/archive/2011/05/02/crm-2011-charts-know-the-real-potential-part-deux.aspx">CRM 2011 Charts – Know the Real Potential ~ Part Deux</a><br />
Gareth Tucker: <a href="http://gtcrm.wordpress.com/2011/03/22/quick-reference-for-common-crm-2011-chart-customisations">Quick Reference for Common CRM 2011 Chart Customisations</a></p>
<p>For help in choosing colours when creating charts for Dynamics CRM, refer to my <a href="http://www.pedroinnecco.com/?p=864">Office Colour Scheme</a> in the next post.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2011/09/dynamics-crm-creating-a-radar-chart/' addthis:title='Dynamics CRM: Creating a radar chart '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2011/09/dynamics-crm-creating-a-radar-chart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamics CRM: The importance of the Lead entity</title>
		<link>http://www.pedroinnecco.com/2011/09/dynamics-crm-the-importance-of-the-lead-entity/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dynamics-crm-the-importance-of-the-lead-entity</link>
		<comments>http://www.pedroinnecco.com/2011/09/dynamics-crm-the-importance-of-the-lead-entity/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 14:28:59 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[lead]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=809</guid>
		<description><![CDATA[One issue I always come across with Dynamics CRM customisations is clients being puzzled about the Leads entity. I do have a share of clients that genuinely have no need [...]]]></description>
			<content:encoded><![CDATA[<p>One issue I always come across with Dynamics CRM customisations is clients being puzzled about the Leads entity. I do have a share of clients that genuinely have no need for the Lead entity, but you&#8217;ll be surprised how many people turn a blind eye to Leads based purely on misunderstandings and incorrect assumptions. Then when we get to explain the real use of the Lead entity they would often go “oh, wait. We do want that!” So I decided to write this post about why I find Leads to be of such importance in Dynamics CRM. <span id="more-809"></span></p>
<p>Basically, creating and qualifying a lead can provide useful information into marketing and sales. For instance, suppose you went to an industry event representing your organisation from where you obtained 150 business cards. You would like to then register those business cards into Dynamics CRM so you can follow up with some sales opportunities.</p>
<p>At this point, all you have is business cards. These cards represent potential clients, but not your actual clients. Sure you could go ahead and register them as accounts and/or contacts, however you&#8217;ll be missing important information about qualifying those records, and likely to have wasted your time if the potential client is not interested in a possible deal.</p>
<p>The Leads entity allows you to create just one record for each business card, instead of one record for an organisation and another for the person. Once a lead is created you can go on and proceed to qualify the record (that is, following up with the potential client and see if you can get an opportunity out of it). This qualifying process can be whatever you want it to be, based on your modus operandi or organisation procedure. For instance, it could be a series of phone calls, followed by some pre-sales meetings. You can create activities such as phone calls, emails and meetings associated to the Lead record, which will help you and your team (if relevant) to make better business decisions on how to approach potential clients. If you hit a dead-end, you can either qualify or disqualify the lead. Qualified leads can then be converted into an account record and/or contact record and/or opportunity record. Disqualified leads on the other hand can be given different status reasons such as <em>Lost</em>, <em>Cannot Contact</em>, <em>No Longer Interested</em> or <em>Cancelled</em>.</p>
<p>Another important aspect of the Lead record is its relationship with Marketing Lists and Campaigns entities. Combining with the lead qualification process, you can measure the effectiveness and efforts of your marketing campaigns. For instance, we could assess leads by source campaign, leads qualified/disqualified for a given period, the industry from which most leads come from, and so on. You could also create goals and metrics related to the Leads entity for your teams. For instance, you could set a goal of 30 leads to be qualified each month in order to track the effectiveness of your marketing team.</p>

<a href='http://www.pedroinnecco.com/2011/09/dynamics-crm-the-importance-of-the-lead-entity/crm2011_leads-importance_01/' title='Incoming Lead Analysis by Month'><img width="150" height="150" src="http://www.pedroinnecco.com/files/crm2011_leads-importance_01-150x150.png" class="attachment-thumbnail" alt="Incoming Lead Analysis by Month" title="Incoming Lead Analysis by Month" /></a>
<a href='http://www.pedroinnecco.com/2011/09/dynamics-crm-the-importance-of-the-lead-entity/crm2011_leads-importance_02/' title='Leads by Rating'><img width="150" height="150" src="http://www.pedroinnecco.com/files/crm2011_leads-importance_02-150x150.png" class="attachment-thumbnail" alt="Leads by Rating" title="Leads by Rating" /></a>
<a href='http://www.pedroinnecco.com/2011/09/dynamics-crm-the-importance-of-the-lead-entity/crm2011_leads-importance_03/' title='Leads by Source'><img width="150" height="150" src="http://www.pedroinnecco.com/files/crm2011_leads-importance_03-150x150.png" class="attachment-thumbnail" alt="Leads by Source" title="Leads by Source" /></a>
<a href='http://www.pedroinnecco.com/2011/09/dynamics-crm-the-importance-of-the-lead-entity/crm2011_leads-importance_04/' title='Leads by Source Campaign'><img width="150" height="150" src="http://www.pedroinnecco.com/files/crm2011_leads-importance_04-150x150.png" class="attachment-thumbnail" alt="Leads by Source Campaign" title="Leads by Source Campaign" /></a>

<p>Finally, the Leads record also allows the automatic capture of leads coming from external websites. For instance, you could have a website that allow customer to provide their contact details in order to obtain further information. Upon registering their details, lead records can be created for your sales team to follow up.</p>
<p class="infobox"><strong>Note:</strong> For further information on how the Lead entity works within the full scope of the sales process in Dynamics CRM, check out <a href="http://www.pedroinnecco.com/?p=413" title="Dynamics CRM: Diving into the sales pipeline – Part 1">my first post in the series</a> about the Dynamics CRM sales pipeline.<br/></p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2011/09/dynamics-crm-the-importance-of-the-lead-entity/' addthis:title='Dynamics CRM: The importance of the Lead entity '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2011/09/dynamics-crm-the-importance-of-the-lead-entity/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Windows 8 and Metro: Let&#8217;s not get carried away</title>
		<link>http://www.pedroinnecco.com/2011/09/windows-8-and-metro-lets-not-get-carried-away/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=windows-8-and-metro-lets-not-get-carried-away</link>
		<comments>http://www.pedroinnecco.com/2011/09/windows-8-and-metro-lets-not-get-carried-away/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 11:18:49 +0000</pubDate>
		<dc:creator>Pedro</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[development preview]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[windows 8]]></category>

		<guid isPermaLink="false">http://www.pedroinnecco.com/?p=745</guid>
		<description><![CDATA[When I was about 8 years old, I saw in an art gallery a painting that got stuck in my memory forever. The canvas had an textured, icy grey background [...]]]></description>
			<content:encoded><![CDATA[<p>When I was about 8 years old, I saw in an art gallery a painting that got stuck in my memory forever. The canvas had an textured, icy grey background colour. Besides that it had only two thin lines of paint crossing each other forming an &#8220;X&#8221;. One of those lines was painted in a soothing lilac tone, starting half-way to the bottom left of the canvas and going on a tangent towards the top-right corner. The other line was a striking tone of pink, which started with a gentle stroke, increasing in contrast as it went on a tangent towards the top-left corner.</p>
<p>Then I checked the price of that piece of work. The next thing I remember was my mother reprehending me for cursing out loud in a public place. This story came to my mind today as I was installing Windows 8, and reflects what I think of the whole hype around the Metro interface.<span id="more-745"></span></p>
<p><a href="http://www.pedroinnecco.com/files/Win8DevPrev_00.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_00-150x150.png" alt="" title="Is this art?" width="150" height="150" class="aligncenter size-thumbnail wp-image-772" /></a></p>
<p>Don&#8217;t get me wrong. I like Metro. I think Microsoft hit the nail right on the head for a touch interface. But here is the thing: Let&#8217;s leave Metro to serve its purpose. That is: tablet devices and touch-based interfaces. Now, I know that Microsoft is saying (and even demonstrated) that the Metro interface will be side-by-side with the traditional desktop, that users can switch between Metro and the traditional desktop any time they want, and so on. But in practice, Windows 8 insists on pushing the Metro interface at every opportunity. For instance, look at the Windows 8 setup screens.</p>
<p><a href="http://www.pedroinnecco.com/files/Win8DevPrev_01.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_01-150x150.png" alt="" title="Windows 8 Development Preview Setup 1/6" width="150" height="150" class="alignnone size-thumbnail wp-image-751" /></a> <a href="http://www.pedroinnecco.com/files/Win8DevPrev_02.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_02-150x150.png" alt="" title="Windows 8 Development Preview Setup 2/6" width="150" height="150" class="alignnone size-thumbnail wp-image-752" /></a> <a href="http://www.pedroinnecco.com/files/Win8DevPrev_03.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_03-150x150.png" alt="" title="Windows 8 Development Preview Setup 3/6" width="150" height="150" class="alignnone size-thumbnail wp-image-753" /></a><br />
<a href="http://www.pedroinnecco.com/files/Win8DevPrev_04.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_04-150x150.png" alt="" title="Windows 8 Development Preview Setup 4/6" width="150" height="150" class="alignnone size-thumbnail wp-image-754" /></a> <a href="http://www.pedroinnecco.com/files/Win8DevPrev_05.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_05-150x150.png" alt="" title="Windows 8 Development Preview Setup 5/6" width="150" height="150" class="alignnone size-thumbnail wp-image-755" /></a> <a href="http://www.pedroinnecco.com/files/Win8DevPrev_06.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_06-150x150.png" alt="" title="Windows 8 Development Preview Setup 6/6" width="150" height="150" class="alignnone size-thumbnail wp-image-756" /></a></p>
<p>Seriously, is this supposed to be chic or innovative? Fair enough this is a development preview, but come on! Those screens look like they were designed on Microsoft Paint (by someone who doesn&#8217;t know how to use Microsoft Paint).  If those screens are anything near to what we should expect from the final version, I am not impressed. I fear that the whole Metro concept can be used as an excuse for lazy artwork (or no artwork at all, which at this point I&#8217;m not sure what would be worse).</p>
<p>So I installed Windows 8 and I went to have a look at the initial desktop. Once again, it focus on the Metro by default. I can click on the desktop tile to go to the desktop, but if I click at the Windows logo to access the start menu, it brings me back to the Metro interface. Sigh&#8230;</p>
<p class="infobox"><strong>Update:</strong> Neowin.net has published an article on their site explaining how to restore the classic start menu in the Desktop of the Window 8 Development Preview (requires editing the registry). You can read the article <a href="http://www.neowin.net/news/windows-8-how-to-re-enable-the-classic-start-menu" target="_blank">here</a>.</p>
<p><a href="http://www.pedroinnecco.com/files/Win8DevPrev_07.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_07-150x150.png" alt="" title="Windows 8 Development Preview Metro Interface" width="150" height="150" class="alignnone size-thumbnail wp-image-757" /></a> <a href="http://www.pedroinnecco.com/files/Win8DevPrev_08.png"><img src="http://www.pedroinnecco.com/files/Win8DevPrev_08-150x150.png" alt="" title="Windows 8 Development Preview Desktop Interface" width="150" height="150" class="alignnone size-thumbnail wp-image-758" /></a></p>
<p>Asserting that Metro is &#8220;the future&#8221; is, in my view, an overestimation that implies that Metro will be pervasive in upcoming versions of Windows and is likely to replace the traditional desktop as we know it. I hope that it isn&#8217;t the case, and that Microsoft is just heavily focusing on the Metro interface at this stage of the development of Windows 8 because it is a new thing which they&#8217;re trying to promote. Again, I like Metro, but I am not on my Windows Phone or at a tablet here. I am trying to use my desktop and the overly simplistic interface infuriates me.</p>
<p>I am sorry but I don&#8217;t think that the Metro interface has its space in desktop computing. For instance, I can&#8217;t see trading workstations, engineering or CAD/CAM software running under it. I want my desktop back. Can I have it please?</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.pedroinnecco.com/2011/09/windows-8-and-metro-lets-not-get-carried-away/' addthis:title='Windows 8 and Metro: Let&#8217;s not get carried away '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.pedroinnecco.com/2011/09/windows-8-and-metro-lets-not-get-carried-away/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

