<?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>CRM Accelerators</title>
	<atom:link href="http://www.crmaccelerators.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crmaccelerators.net</link>
	<description></description>
	<lastBuildDate>Thu, 25 Apr 2013 12:33:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Changes to IFRAME Properties</title>
		<link>http://www.crmaccelerators.net/2013/04/24/changes-to-iframe-properties/</link>
		<comments>http://www.crmaccelerators.net/2013/04/24/changes-to-iframe-properties/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 07:14:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=225</guid>
		<description><![CDATA[In Dynamics CRM 4.0, the Label property of an IFRAME was not required: &#160; With Dynamics CRM 2011, the Label property is required: &#160; This is not a problem until you attempt to edit the properties of an IFRAME. If the Label is blank, you will receive and error and be forced to complete the [...]]]></description>
				<content:encoded><![CDATA[<p>In Dynamics CRM 4.0, the Label property of an IFRAME was not required:</p>
<p><a href="http://crmaccelerators.net/images/ebccb4fd9916_E34B/image.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://crmaccelerators.net/images/ebccb4fd9916_E34B/image_thumb.png" width="354" height="442" /></a></p>
<p>&#160;</p>
<p>With Dynamics CRM 2011, the Label property <em>is</em> required:</p>
<p><a href="http://crmaccelerators.net/images/ebccb4fd9916_E34B/image_3.png" rel="lightbox"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://crmaccelerators.net/images/ebccb4fd9916_E34B/image_thumb_3.png" width="354" height="453" /></a></p>
<p>&#160;</p>
<p>This is not a problem until you attempt to edit the properties of an IFRAME. If the Label is blank, you will receive and error and be forced to complete the field.</p>
<p>Not a huge deal, but something you will have to correct when you may not have been expecting it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2013/04/24/changes-to-iframe-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade Your URL Parameter References</title>
		<link>http://www.crmaccelerators.net/2013/04/23/upgrade-your-url-parameter-references/</link>
		<comments>http://www.crmaccelerators.net/2013/04/23/upgrade-your-url-parameter-references/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 20:21:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=224</guid>
		<description><![CDATA[There are times when working in either JavaScript or .NET where you need to either display a CRM record or give the user the option of clicking a link to display a CRM record. The CRM 2011 SDK documents this process here: Open Forms, Views, Dialogs and Reports with a URL? It also includes a [...]]]></description>
				<content:encoded><![CDATA[<p>There are times when working in either JavaScript or .NET where you need to either display a CRM record or give the user the option of clicking a link to display a CRM record.</p>
<p>The CRM 2011 SDK documents this process here:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/gg328483.aspx"><b>Open Forms, Views, Dialogs and Reports with a URL</b>?</a></p>
<p>It also includes a very important note:</p>
<blockquote><p>Do not use the <b>etc</b> (entity type code) parameter that contains an integer code for the entity. This integer code varies for custom entities in different organizations.</p>
</blockquote>
<p>One of the required parameters on a Dynamics CRM URL is the type of entity you&#8217;re opening. This is specified by one of these parameters:</p>
<ul>
<li><strong>etc</strong> &#8211; for Entity Type Code </li>
<li><strong>etn</strong> &#8211; for Entity Type Name </li>
</ul>
<p>&#160;</p>
<p>In Dynamics CRM 4.0, (and 3.0 for that matter), most people used the <strong>etc</strong> parameter.&#160; This cause some very bad side-effects when moving your code from installation to installation (development, test, production).&#160; The Entity Type Code could, and often did, vary from installation to installation.</p>
<p><strong>etn</strong>, the second parameter, allows you to specify the name of the entity: account, contact, new_entity, etc.&#160; This information does <em>not</em> change from installation to installation.</p>
<blockquote><p><strong>Anecdotal Evidence:</strong></p>
<p>I once saved 30 minutes per roll-out by switching all of my URL references from <strong>etc</strong> to <strong>etn</strong>. Before that, I had to hand-modify my code to reference the proper Entity Type Code and had to maintain an Excel worksheet with that information.</p>
</blockquote>
<p><strong>etn</strong> has been around since at least CRM 4.0 but you can save yourself a lot of trouble in the future, by converting your code from <strong>etc</strong> to <strong>etn</strong>.</p>
<p>&#160;</p>
<h2>Problems and Issues</h2>
<p>I ran into an unexpected situation during an upgrade that quite honestly, left me a bit baffled. It seems a breaking change was introduced during the CRM 2011 upgrade process.</p>
<p>&#160;</p>
<h3>Some Background</h3>
<p>In CRM 4.0, you could open an Entity record with either one of the following URLs:</p>
<p><a href="http://crm2011/Contoso/userdefined/edit.aspx?id=%7bE50B1A7B-1AA2-E211-953E-00155D200507%7d&amp;etn=new_entity">http://crm2011/Contoso/userdefined/edit.aspx?id=%7bE50B1A7B-1AA2-E211-953E-00155D200507%7d&amp;<strong>etn</strong>=new_entity</a> </p>
<p><a href="http://crm2011/Contoso/userdefined/edit.aspx?id=%7bE50B1A7B-1AA2-E211-953E-00155D200507%7d&amp;etc=10010">http://crm2011/Contoso/userdefined/edit.aspx?id=%7bE50B1A7B-1AA2-E211-953E-00155D200507%7d&amp;<strong>etc</strong>=10010</a> </p>
<p>The difference being using the parameter <strong>etn</strong> (entity type name) instead of <strong>etc</strong> (entity type code). Using <strong>etn</strong> is preferable because it causes fewer issues when migrating from one system to another (development, test, production). </p>
<p>This technique is used extensively in an xRM scenario where you may have additional web pages that use or reference CRM data. It is common to have a screen artifact, like a button, that will open a CRM record when pressed and the URLs listed above are what is used. </p>
<p>. </p>
<h3>The Issue</h3>
<p>It would seem that the <strong>etn</strong> parameter is no longer supported by the edit.aspx page in CRM 2011 for what appears to be custom entities only. It seems to work fine for out-of-the-box entities. </p>
<h4>The Solution</h4>
<p>The use of <strong>etn</strong> is ONLY supported on <u>main.aspx</u>, AND you need to specify the <b>&amp;pagetype=entityrecord</b> parameter, like this: </p>
<p><a href="http://crm2011/Contoso/main.aspx?etn=new_entity&amp;id=%7bBB81247D-7494-E111-913F-00155D00650B%7d&amp;pagetype=entityrecord">http://crm2011/Contoso/main.aspx?etn=new_entity&amp;id=%7bBB81247D-7494-E111-913F-00155D00650B%7d&amp;pagetype=entityrecord</a> </p>
<p>&#160;</p>
<h3>Further Confusion</h3>
<p>I am sure you have noticed, and maybe used, the Copy a Link/Email a Link functionality built into CRM:</p>
<p><a href="http://crmaccelerators.net/images/c2a09ce73bde_D54D/image_thumb.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb" border="0" alt="image_thumb" src="http://crmaccelerators.net/images/c2a09ce73bde_D54D/image_thumb_thumb.png" width="211" height="100" /></a></p>
<p>This is a very handy feature and I use it all of the time.</p>
<p>Unfortunately, it will return a different URL depending on the entity being used. Standard entities will produce a URL with main.aspx while custom entities will produce edit.aspx.</p>
<p>And again, only main.aspx can use the <strong>etn</strong> parameter.</p>
<p>&#160;</p>
<h3>Additional Reading</h3>
<p>I cover this topic a little more in this article:</p>
<p><a href="http://www.crmaccelerators.net/2013/04/23/upgrade-your-url-parameter-references/">Upgrade Your URL Parameter References</a></p>
<p>and I&#8217;ll update that article to reflect this new information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2013/04/23/upgrade-your-url-parameter-references/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Conversion: Creating a supported LookupControlItem method</title>
		<link>http://www.crmaccelerators.net/2013/03/23/creating-a-lookupcontrolitem-method-that-is-supported-in-dynamics-crm-2011/</link>
		<comments>http://www.crmaccelerators.net/2013/03/23/creating-a-lookupcontrolitem-method-that-is-supported-in-dynamics-crm-2011/#comments</comments>
		<pubDate>Sat, 23 Mar 2013 16:08:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=221</guid>
		<description><![CDATA[In Dynamics CRM 4.0, you could use an unsupported internal function to create the value to be inserted into a Lookup control.  The code would look something like this: var lookupItem = new Array(); lookupItem[0] = new LookupControlItem("{3A6C1B06-C62F-DC11-AFC2-0019B9B20373}", 1, "A Sales Store 3"); crmForm.all.pricelevelid.DataValue = lookupItem; &#160; This function still exists in Dynamics CRM 2011 [...]]]></description>
				<content:encoded><![CDATA[<p>In Dynamics CRM 4.0, you could use an unsupported internal function to create the value to be inserted into a Lookup control.  The code would look something like this:</p>
<pre class="code"><span style="color: blue;">var </span>lookupItem = <span style="color: blue;">new </span>Array();
lookupItem[0] = <span style="color: blue;">new </span>LookupControlItem(<span style="color: maroon;">"{3A6C1B06-C62F-DC11-AFC2-0019B9B20373}"</span>, 1, <span style="color: maroon;">"A Sales Store 3"</span>);
crmForm.all.pricelevelid.DataValue = lookupItem;</pre>
<p>&nbsp;</p>
<p>This function still exists in Dynamics CRM 2011 but it is still unsupported and quite honestly, doesn&#8217;t look like it works correctly. This is mostly due to the fact that using the Object Type Code, or the numeric identifier for the Entity, has been deprecated and no longer functions as it once did.  In CRM 2011, you must use the Entity&#8217;s Name instead.</p>
<p>So, where does that leave us?  Fortunately, in a not so bad place.</p>
<p>You can add the following function to a JScript web resource, add the web resource to your form, and modify your code a little, and it will function as it always did.  Here is the new function:</p>
<pre class="code"><span style="color: blue;">function </span>LookupControlItem2011(id, typeName, name)
{
    <span style="color: blue;">var </span>lookupItem = <span style="color: blue;">new </span>Object();

    lookupItem.id = id;
    lookupItem.entityType = typeName;
    lookupItem.name = name;

    <span style="color: blue;">return </span>lookupItem;
}</pre>
<p>&nbsp;</p>
<p>It is used like this:</p>
<pre class="code"><span style="color: blue;">var </span>lookupData = <span style="color: blue;">new </span>Array();
lookupData[0] = LookupControlItem2011(<span style="color: maroon;">'{B1FC92B0-B305-E211-B881-00155D00650B}'</span>, <span style="color: maroon;">"account"</span>, <span style="color: maroon;">'A Sales Store 3'</span>);

Xrm.Page.getAttribute(<span style="color: maroon;">"parentaccountid"</span>).setValue(lookupData);</pre>
<p>&nbsp;</p>
<p>Three things had to change, to make this work correctly:</p>
<p>1. Remove the <strong>new</strong> keyword from in front of LookupControlItem.</p>
<p>2. Rename <span style="text-decoration: underline;">LookupControlItem</span> to <span style="text-decoration: underline;">LookupControlItem2011</span>, which will prevent a conflict with the existing function.</p>
<p>3. Replace the 2nd parameter, which is an integer, with the schema name for the Entity.</p>
<blockquote><p>As you can see from my examples, I replaced <span style="text-decoration: underline;">1</span> with <span style="text-decoration: underline;">account</span>.</p></blockquote>
<p>&nbsp;</p>
<p>Making these small changes will allow you to use your existing code with a minimum amount of effort.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2013/03/23/creating-a-lookupcontrolitem-method-that-is-supported-in-dynamics-crm-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Conversion: Removing unnecessary code #1. Adding mailto to an email-enable text field</title>
		<link>http://www.crmaccelerators.net/2012/09/20/javascript-conversion-removing-unnecessary-code-1-adding-mailto-to-an-email-enable-text-field/</link>
		<comments>http://www.crmaccelerators.net/2012/09/20/javascript-conversion-removing-unnecessary-code-1-adding-mailto-to-an-email-enable-text-field/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 13:36:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=197</guid>
		<description><![CDATA[Occasionally I will run into JavaScript that was added to a form to provide functionality desirable by the business. I have seen several instances where code such as this: &#160; if (crmForm.all.emailaddress1 != null) { crmForm.all.emailaddress1.ondblclick = function () { var email = crmForm.all.emailaddress1.DataValue; if ((email != null) &#38;&#38; (email.length &#62; 0)) { window.navigate(&#34;mailto:&#34; + [...]]]></description>
				<content:encoded><![CDATA[<p>Occasionally I will run into JavaScript that was added to a form to provide functionality desirable by the business.</p>
<p>I have seen several instances where code such as this:</p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">if </span>(crmForm.all.emailaddress1 != <span style="color: blue">null</span>)
{

    crmForm.all.emailaddress1.ondblclick = <span style="color: blue">function </span>()
    {

        <span style="color: blue">var </span>email = crmForm.all.emailaddress1.DataValue;

        <span style="color: blue">if </span>((email != <span style="color: blue">null</span>) &amp;&amp; (email.length &gt; 0))
        {
            window.navigate(<span style="color: maroon">&quot;mailto:&quot; </span>+ email);
        }
    }
}</pre>
<p>&#160;</p>
<p>Has been added to turn an email-style text field into a hyperlink that will launch the user&#8217;s default email editor when clicked or double-clicked.</p>
<p>The code above is unnecessary because Dynamics CRM 2011 offers this feature by default so any instance of this code can be safely removed and the functionality will still exist.</p>
<p>This is not a huge deal, but it is one less piece of code that needs to be maintained.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2012/09/20/javascript-conversion-removing-unnecessary-code-1-adding-mailto-to-an-email-enable-text-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Conversion: Handling Automatic Semicolon Insertion</title>
		<link>http://www.crmaccelerators.net/2012/09/18/javascript-conversion-handling-automatic-semicolon-insertion/</link>
		<comments>http://www.crmaccelerators.net/2012/09/18/javascript-conversion-handling-automatic-semicolon-insertion/#comments</comments>
		<pubDate>Tue, 18 Sep 2012 13:44:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=196</guid>
		<description><![CDATA[One of the most difficult parts of converting JavaScript from CRM 4.0 to 2011 is handling situations where the developer did not use a terminating semicolon.&#160; Actually, this is a problem with JavaScript in general, as I was reminded this week when I listened to the Drama episode of the This Developer&#8217;s Life podcast.&#160; That [...]]]></description>
				<content:encoded><![CDATA[<p>One of the most difficult parts of converting JavaScript from CRM 4.0 to 2011 is handling situations where the developer did not use a terminating semicolon.&#160; Actually, this is a problem with JavaScript in general, as I was reminded this week when I listened to the <a href="http://thisdeveloperslife.com/post/2-0-9-drama" target="_blank">Drama episode</a> of the <a href="http://thisdeveloperslife.com/" target="_blank">This Developer&#8217;s Life</a> podcast.&#160; That got me to thinking that maybe I should mention it here to add the the JavaScript Conversion knowledgebase.</p>
<p>&#160;</p>
<h2>The Situation</h2>
<p>JavaScript doesn&#8217;t actually <em>require</em> you to insert a terminating semicolon. If you do not, the JavaScript runtime of the browser will insert one for you. </p>
<p>&#160;</p>
<h2>The Problem (in general)</h2>
<p>Problems arise when the JavaScript runtime &quot;guesses&quot; incorrectly, inserts a semicolon where one is not supposed to be, and it alters the execution of your JavaScript.</p>
<p>&#160;</p>
<h2>The Cause</h2>
<p>Sometimes this occurs due to an oversight on the part of the developer ( just plain didn&#8217;t type it in ).&#160; Other times it is because the developer did not know any better.&#160; A lot of CRM users who are new to JavaScript simply type in code and don&#8217;t understand the underlying reasoning behind it.&#160; Finally, some JavaScript developers think a semicolon detracts from the code readability and don&#8217;t use semicolons for that reason.</p>
<p>Regardless, it can lead to problems.</p>
<p>&#160;</p>
<h2>The Problem (specific to the JavaScript conversion process)</h2>
<p>The CRM JavaScript Conversion Assistant actually performs a <a href="http://en.wikipedia.org/wiki/Lexical_analysis" target="_blank">Lexical Analysis</a> of the JavaScript being converted. </p>
<p>During this &quot;tokenization&quot; process, semicolons are not actually inserted, but the locations where they <em>should</em> be are treated as if a semicolon existed so the tokens are properly generated. This, for the most part, works as you might expect, and in much the same way that a JavaScript runtime would. </p>
<p>Issues start to arise during the actual conversion process. As I mentioned, semicolons are not actually inserted into the token stream. This means that if the token conversion process is looking for a terminating semicolon, errors can be generated when one is not found.</p>
<p>In most cases we have constructed the token conversion process to take this situation into account, but there are probably edge cases where the code is written in such a way as to cause a conversion failure.</p>
<p>&#160;</p>
<p><strong><em>If you run into this situation, then please send us the code segment that is causing the issue and we&#8217;ll work to create a fix.</em></strong></p>
<p>&#160;</p>
<h2>Conclusion</h2>
<p>In general, when performing the conversion from CRM 4.0 to CRM 2011, it&#8217;s a perfect time to fix any code-design issues you might find.&#160; So, keep an eye out for the missing semicolons and add them where required.</p>
<p>&#160;</p>
<h2>Further Information:</h2>
<p><a href="http://bclary.com/2004/11/07/#a-7.9.1" target="_blank">7.9.1 Rules of Automatic Semicolon Insertion</a></p>
<p><a title="http://cjihrig.com/blog/the-dangers-of-javascripts-automatic-semicolon-insertion/" href="http://cjihrig.com/blog/the-dangers-of-javascripts-automatic-semicolon-insertion/">http://cjihrig.com/blog/the-dangers-of-javascripts-automatic-semicolon-insertion/</a></p>
<p><a title="http://elegantcode.com/2011/01/12/basic-javascript-part-6-automatic-semicolon-insertion/" href="http://elegantcode.com/2011/01/12/basic-javascript-part-6-automatic-semicolon-insertion/">http://elegantcode.com/2011/01/12/basic-javascript-part-6-automatic-semicolon-insertion/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2012/09/18/javascript-conversion-handling-automatic-semicolon-insertion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Conversion Keywords</title>
		<link>http://www.crmaccelerators.net/2012/09/14/javascript-conversion-keywords/</link>
		<comments>http://www.crmaccelerators.net/2012/09/14/javascript-conversion-keywords/#comments</comments>
		<pubDate>Fri, 14 Sep 2012 19:46:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=194</guid>
		<description><![CDATA[During my recent JavaScript Conversion discussions webinar I showed a list of Supported and Unsupported keywords. I&#8217;ve created a page so that you can view them without having to download the webinar support materials. If you run into something that is not on either of these lists, I would really appreciate it if you could [...]]]></description>
				<content:encoded><![CDATA[<p>During my recent <a href="http://www.crmaccelerators.net/2012/09/08/javascript-conversion-discussions-webinar-recording/" target="_blank">JavaScript Conversion discussions webinar</a> I showed a list of Supported and Unsupported keywords.</p>
<p>I&#8217;ve created a <a href="http://www.crmaccelerators.net/products/crm-migration-assistant-2/conversion-keywords/" target="_blank">page</a> so that you can view them without having to download the webinar support materials.</p>
<p>If you run into something that is not on either of these lists, I would really appreciate it if you could send me a code sample so I can research the conversion possibilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2012/09/14/javascript-conversion-keywords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Conversion Discussions Webinar Recording and Materials</title>
		<link>http://www.crmaccelerators.net/2012/09/08/javascript-conversion-discussions-webinar-recording/</link>
		<comments>http://www.crmaccelerators.net/2012/09/08/javascript-conversion-discussions-webinar-recording/#comments</comments>
		<pubDate>Sat, 08 Sep 2012 20:29:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=189</guid>
		<description><![CDATA[JavaScript Conversion Discussions Webinar (September, 2012) We&#8217;ll discussed the technical aspects of converting your JavaScript from CRM 4.0 to CRM 2011, as well as the processes that will aid in the overall upgrade process. &#160; Tools to Help Your Conversion: JavaScript Converter http://dynamicsxrmtools.codeplex.com &#160; CRM JavaScript Conversion Assistant http://www.crmaccelerators.net/products/crm-migration-assistant-2 &#160; CRM Code Validation Tool http://blogs.msdn.com/b/crm/archive/2012/06/21/microsoft-dynamics-crm-2011-custom-code-validation-tool-released.aspx &#160; [...]]]></description>
				<content:encoded><![CDATA[<p><strong>JavaScript Conversion Discussions Webinar (September, 2012)</strong></p>
<p>We&#8217;ll discussed the technical aspects of converting your JavaScript from CRM 4.0 to CRM 2011, as well as the processes that will aid in the overall upgrade process.</p>
<p><iframe style="overflow: hidden;" name="tsc_player" src="http://www.screencast.com/users/Mitch_Milam/folders/CRM Accelerators/media/55332ab8-f1d9-436d-b7f1-d3e6d84ec1fd/embed" frameborder="0" scrolling="no" width="768" height="480"></iframe></p>
<p>&nbsp;</p>
<p><strong>Tools to Help Your Conversion:</strong></p>
<p>JavaScript Converter</p>
<p><a href="http://dynamicsxrmtools.codeplex.com">http://dynamicsxrmtools.codeplex.com</a></p>
<p>&nbsp;</p>
<p>CRM JavaScript Conversion Assistant</p>
<p><a href="http://www.crmaccelerators.net/products/crm-migration-assistant-2">http://www.crmaccelerators.net/products/crm-migration-assistant-2</a></p>
<p>&nbsp;</p>
<p>CRM Code Validation Tool</p>
<p><a href="http://blogs.msdn.com/b/crm/archive/2012/06/21/microsoft-dynamics-crm-2011-custom-code-validation-tool-released.aspx">http://blogs.msdn.com/b/crm/archive/2012/06/21/microsoft-dynamics-crm-2011-custom-code-validation-tool-released.aspx</a></p>
<p>&nbsp;</p>
<p>Export JavaScript</p>
<p><a href="http://blogs.infinite-x.net/free-utilities">http://blogs.infinite-x.net/free-utilities</a></p>
<p>&nbsp;</p>
<p>Export Web Resources</p>
<p><a href="http://blogs.infinite-x.net/free-utilities">http://blogs.infinite-x.net/free-utilities</a></p>
<p>&nbsp;</p>
<p>Web Resource Manager</p>
<p><a href="http://jswebresourcemanager.codeplex.com">http://jswebresourcemanager.codeplex.com</a></p>
<p>&nbsp;</p>
<p><strong>Conversion Keywords and Sample Conversions:</strong></p>
<p>Here is the Excel worksheet discussed that the end of the presentation. It contains keywords that can be successfully converted as well as those that cannot.</p>
<p><a href="http://www.crmaccelerators.net/downloads/JavaScriptConversionDiscussions">Download</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2012/09/08/javascript-conversion-discussions-webinar-recording/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CRM JavaScript Conversion Assistant 2.0 Released. New name, new features, new price</title>
		<link>http://www.crmaccelerators.net/2012/07/11/crm-javascript-conversion-assistant-2-0-released-new-name-new-features-new-price/</link>
		<comments>http://www.crmaccelerators.net/2012/07/11/crm-javascript-conversion-assistant-2-0-released-new-name-new-features-new-price/#comments</comments>
		<pubDate>Wed, 11 Jul 2012 16:48:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=186</guid>
		<description><![CDATA[I am very proud, and a little relieved, to announce that general availability of the CRM JavaScript Conversion Assistant 2.0. Download the trial version now or visit our product page for more information. &#160; New Name The product formally known as the CRM Migration Assistant has been renamed to the CRM JavaScript Conversion Assistant to [...]]]></description>
				<content:encoded><![CDATA[<p>I am very proud, and a little relieved, to announce that general availability of the CRM JavaScript Conversion Assistant 2.0.</p>
<p>Download the <a href="http://www.crmaccelerators.net/products/crm-migration-assistant-2/crm-migration-assistant-demo-request/">trial version</a> now or visit our <a href="http://www.crmaccelerators.net/products/crm-migration-assistant-2/" target="_blank">product page</a> for more information.</p>
<p>&#160;</p>
<h1>New Name</h1>
<p>The product formally known as the CRM Migration Assistant has been renamed to the CRM JavaScript Conversion Assistant to more closely match its name with its functionality.</p>
<p>I am keeping the version number sequence the same.</p>
<p>&#160;</p>
<h1>New Price</h1>
<p>The price has been reduced to $395 (from $495).</p>
<p>&#160;</p>
<h1>New Features</h1>
<h2></h2>
<p>The following new features have been added:</p>
<h2>Convert from CRM 2011</h2>
<p>The most important feature added is the ability to connect to a CRM 2011 Organization and convert the existing JavaScript Web Resources.</p>
<p>The JavaScript can be uploaded back into CRM 2011 after you have finished the conversion process.</p>
<h2>Conversion Alert Handling</h2>
<p>The way conversion alerts are handled in the user interface has been enhanced. Any entity that contains conversion alerts is now highlighted in the event list:</p>
<p><a href="http://crmaccelerators.net/images/CRM-JavaScript-Conversion-.-New-features_8DE9/EventList.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="EventList" border="0" alt="EventList" src="http://crmaccelerators.net/images/CRM-JavaScript-Conversion-.-New-features_8DE9/EventList_thumb.png" width="225" height="235" /></a></p>
<p>The number of conversion alerts is displayed in the upper-right corner of the CRM 2011 window. This is actually a button. Clicking the button will cause the CRM 2011 editor to jump to the next Conversion Alert.</p>
<p><a href="http://crmaccelerators.net/images/CRM-JavaScript-Conversion-.-New-features_8DE9/ConversionAlerts-Count.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ConversionAlerts-Count" border="0" alt="ConversionAlerts-Count" src="http://crmaccelerators.net/images/CRM-JavaScript-Conversion-.-New-features_8DE9/ConversionAlerts-Count_thumb.png" width="404" height="475" /></a></p>
<p>Markers have been placed in the left margin on lines that contain a Conversion Alert:</p>
<p><a href="http://crmaccelerators.net/images/CRM-JavaScript-Conversion-.-New-features_8DE9/ConversionAlerts-Markers.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ConversionAlerts-Markers" border="0" alt="ConversionAlerts-Markers" src="http://crmaccelerators.net/images/CRM-JavaScript-Conversion-.-New-features_8DE9/ConversionAlerts-Markers_thumb.png" width="404" height="475" /></a></p>
<p>Next and Previous buttons have been added that allow you to jump to the next and previous Conversion Alert:</p>
<p><a href="http://crmaccelerators.net/images/CRM-JavaScript-Conversion-.-New-features_8DE9/ConversionAlerts-NextPreviousButtons.png" rel="lightbox"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ConversionAlerts-NextPreviousButtons" border="0" alt="ConversionAlerts-NextPreviousButtons" src="http://crmaccelerators.net/images/CRM-JavaScript-Conversion-.-New-features_8DE9/ConversionAlerts-NextPreviousButtons_thumb.png" width="404" height="475" /></a></p>
<p>&#160;</p>
<h2>Improved Conversion Report</h2>
<p>The Conversion Report has been modified and enhanced to provide a better view into the work that either has been performed by the conversion process or the work that will need to be provided. Here is how the Conversion Report is designed:</p>
<h4>ROI</h4>
<p>Provides a &quot;guestimate&quot; as to the amount of time and the CRM JavaScript Conversion Assistant saved you.</p>
<h4>Conversion Alerts</h4>
<p>Lists all of the conversion alerts found during the conversion process.</p>
<p>&#160;</p>
<h4>ActiveX Objects</h4>
<p>Lists all ActiveX objects that were found, and their locations. This is good to know if you are planning to provide cross-browser support.</p>
<h4>External Files</h4>
<p>Any references to external files including: JavaScript, .ASPX, .CSS, and .ASMX</p>
<h4>Object Locations</h4>
<p>References to attributes and functions and where they can be found on the forms.</p>
<h4>Duplicate Functions</h4>
<p>This is a list of duplicate function names and where they can be found. Reduction of duplicate functions is one of the primary cleanup activities when you&#8217;re converting from CRM 4.0.</p>
<h4>Duplicate Events</h4>
<p>Events whose JavaScript exactly matches. Again, this is provided to help you reduce the amount of code you are writing and maintaining.</p>
<h4>Event Summary</h4>
<p>Lists the following information for each of the entities converted:</p>
<ul>
<li>Name </li>
<li>Lines of Code </li>
<li>Conversion Alerts report </li>
<li>Conversions performed by the CRM JavaScript Conversion Assistant. </li>
</ul>
<p>&#160;</p>
<h1>New Conversions</h1>
<p>The conversion process has been enhanced and the following conversions have been added:</p>
<p><strong><u>1.</u></strong> Added Conversion Alerts for the following keywords:</p>
<ul>
<li>AddBindingColumn </li>
<li>AddDependentParameters </li>
<li>AddItems </li>
<li>AddOptionGroup </li>
<li>allowblankdate </li>
<li>AreValuesDifferent </li>
<li>AttachDataSlugEvents </li>
<li>attachEventHandler </li>
<li>BuildXml </li>
<li>BuildXmlToSubmitForm </li>
<li>BypassValidation </li>
<li>CreateInnerSlug </li>
<li>crmTabBar </li>
<li>CurrencyPrecision </li>
<li>CurrencySymbol </li>
<li>CurrentOperatorIsClear </li>
<li>DataXml </li>
<li>dblclick </li>
<li>DeleteDataSlug </li>
<li>DeleteDataSlug </li>
<li>displayMissingValue </li>
<li>DisplayValue </li>
<li>fireSaveEvent </li>
<li>FormatDuration </li>
<li>GetDataXml </li>
<li>GetInnerControl </li>
<li>GetLabelControl </li>
<li>GetLookupControl </li>
<li>getLookupField </li>
<li>GetLookupTypeIcon </li>
<li>GetTab </li>
<li>getTime </li>
<li>GetXml </li>
<li>IgnoreCurrencySymbol </li>
<li>InitializeLookupPresence </li>
<li>insertCell </li>
<li>insertRow </li>
<li>InsertSlugControl </li>
<li>IsBaseCurrency </li>
<li>IsMoney </li>
<li>IsPermissibleType </li>
<li>IsValid </li>
<li>Items </li>
<li>launchOnDemandWorkflowForm </li>
<li>Lookup </li>
<li>NO_DATA </li>
<li>oncontextmenu </li>
<li>onfocusin </li>
<li>onfocusout </li>
<li>onmouseenter </li>
<li>onmouseleave </li>
<li>ParseXml </li>
<li>Print </li>
<li>QueryLookupPresence </li>
<li>RaiseOnAfterSelectEvent </li>
<li>RaiseOnChange </li>
<li>RaiseOnChangeEvent </li>
<li>RaiseSetAdditionalParamsEvent </li>
<li>RefreshLookupItemImage </li>
<li>refreshTimeValue </li>
<li>RemoveItem </li>
<li>ResetDefault </li>
<li>ResetToDefault </li>
<li>RunReport </li>
<li>SetAllFieldsToNonReqLevel </li>
<li>SetCurrency </li>
<li>SetDataSlugs </li>
<li>SetTabFocus </li>
<li>setTime </li>
<li>Sort </li>
<li>SortingEnum </li>
<li>SubmitFormId </li>
<li>swapNode </li>
<li>TimeControl </li>
<li>UpdateInnerHtml </li>
<li>UpdateItem </li>
<li>UpdateOperatorControl </li>
<li>VerifyFieldIsSet </li>
<li>Visible </li>
<li>WillSubmit </li>
</ul>
<p>Many of these came from information found in the <a href="http://blogs.msdn.com/b/crm/archive/2012/06/21/microsoft-dynamics-crm-2011-custom-code-validation-tool-released.aspx" target="_blank">Custom Code Validation Tool</a> that Microsoft released a couple of weeks ago.</p>
<p>It should be noted that not all of these keywords identified in the Custom Code Validation Tool will be recognized by the CRM JavaScript Conversion Assistant. This is because the conversion process is verified by a series of unit tests ( 510 at the moment ) and I could not find code samples to verify the usage of the method or property. Since I could not find code, I could not write a test. Not test means no inclusion in the conversion process.</p>
<p>If you run into anything that I missed, please send me a code sample and I&#8217;ll get it added to the process as soon as I can.</p>
<p><strong><u>2.</u></strong> Converted: crmForm.HideField(crmForm.all.lastname) to     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getControl(&quot;lastname&quot;).setVisible(false)</p>
<p><strong><u>3.</u></strong> crmForm.&lt;attribute name&gt;.Clear     <br />&#160; <br />This internal method was used to remove data from an attribute. The supported way to do this is Xrm.Page.getAttribute(&quot;&lt;attribute name&gt;&quot;).setValue(null);</p>
<p><strong><u>4.</u></strong> Corrected conversion issues caused by improperly written JavaScript.</p>
<p><strong><u>5.</u></strong> Added support for .defaultValue, which converts to setValue().</p>
<p><strong><u>6.</u></strong> Any references to <u>window.event.srcElement</u> will automatically have     <br />&#160;&#160; the &quot;window.&quot; qualifier removed.</p>
<p><strong><u>7.</u></strong> Added a conversion alert when any hard-code GUID is found. For example:     <br />lookupItem.id = &#8216;{45A34093-8731-DC11-A0C7-0019B9DE8282}&#8217;;     <br />lookupItem.id = /* CONVERSION ALERT */&#8217;{45A34093-8731-DC11-A0C7-0019B9DE8282}&#8217;;</p>
<p>8<strong><u>.</u></strong> Added support for conversion alerts for:</p>
<ul>
<li>areaAccounts </li>
<li>areaContacts      </li>
<li>areaAddresses </li>
<li>areaOpps </li>
<li>areaQuotes </li>
<li>areaOrdersareaInvoices </li>
<li>areaService </li>
<li>areaContracts </li>
<li>areaRelationships </li>
<li>areaListsInSFA </li>
<li>areaCampaignsInSFA </li>
<li>areaCampaignsInListareaForm </li>
</ul>
<p><strong><u>9.</u></strong> .Click method handling:     <br />&#160;&#160; crmFrom.all.tab1Tab.click();     <br />&#160;&#160; Xrm.Page.ui.tabs.get(1).setFocus();</p>
<p>&#160;&#160; document.getElementById(&#8216;navAddresses&#8217;).click();    <br />&#160;&#160; Xrm.Page.ui.navigation.items.get(&quot;navAddresses&quot;).setFocus();</p>
<p>&#160;&#160; All others produce a Conversion Alert.</p>
<p><strong><u>10.</u></strong> crmForm.all.name.setAttribute(&quot;display&quot;, &quot;none&quot;); convers to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getControl(&quot;name&quot;).setVisible(false);</p>
<p><strong><u>11.</u></strong> crmForm.all.name.Visible = true; converts to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getControl(&quot;name&quot;).setVisible(true);</p>
<p><strong><u>12.</u></strong> innerText property handling:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; crmForm.all.tab2Tab.innerText = &#8216;Contacts&#8217;; converts to:    <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.ui.tabs.get(2).setLabel(&#8216;Contacts&#8217;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; document.getElementById(&#8216;navActivityHistory&#8217;).innerText = &quot;Closed History&quot;);    <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.ui.navigation.items.get(&quot;navActivityHistory&quot;).setLabel(&quot;Closed History&quot;));</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; crmForm.all.new_field.innerText = &quot;My Label&quot;;    <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getControl(&quot;new_field&quot;).setLabel(&quot;My Label&quot;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; crmForm.document.title = titleElem.innerText;    <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getAttribute(&quot;document&quot;)./* CONVERSION ALERT */title = titleElem.     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /* CONVERSION ALERT */innerText;</p>
<p><strong><u>13.</u></strong> crmForm.SetLabel converts to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getControl (\&quot;estimatedvalue_base\&quot;).setLabel();</p>
<p><strong><u>14.</u></strong> crmForm.GetControl() converts to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.ui.controls.get()</p>
<p><strong><u>15.</u></strong> Conversion alerts added for any of the following external file extensions:     <br />&#160;&#160;&#160;&#160;&#160;&#160; .js, .aspx, .css, .asmx</p>
<p><strong><u>16.</u></strong> When inserting a conversion alert, the previous code block is checked and if a prior conversion alert is found, a new one is not inserted.</p>
<p><strong><u>17.</u></strong> crmForm.all.name.MaxLength is now converted to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getAttribute(&quot;name&quot;).getmaxLength()</p>
<p><strong><u>18.</u></strong> crmForm.all.new_field.SelectedIndex converts to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getAttribute(&quot;new_field&quot;).setValue();</p>
<p><strong><u>19.</u></strong> crmForm.all.new_field.SelectedOption converts to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getAttribute(&quot;new_field&quot;).getSelectedOption()</p>
<p><strong><u>20.</u></strong> crmForm.all.new_field.Value converts to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getAttribute(&quot;new_field&quot;).getSelectedOption()</p>
<p><strong><u>21.</u></strong> crmForm.GetLabel(crmForm.all.customerid); converts to:     <br />&#160;&#160;&#160;&#160;&#160;&#160; Xrm.Page.getControl(&quot;customerid&quot;).getLabel();</p>
<p><strong><u>22.</u></strong> oNavItem.style.setAttribute(&quot;display&quot;, &quot;none&quot;); converts to     <br />&#160;&#160;&#160;&#160;&#160;&#160; oNavItem./* CONVERSION ALERT */style.setVisible(false);</p>
<blockquote><p>Note: the style reference can probably be safely removed, in the sample above, but this needs to be a manual process.</p>
</blockquote>
<p><strong><u>23.</u></strong> Modified the conversion alert process for ObjectTypeCode.     </p>
<p>&#160;</p>
<h2>Conversion Speed Improvements</h2>
<p>The conversion time has been reduced again.&#160; Here are the conversion metrics for my main test organization:</p>
<p>Files: 144, Lines of JavaScript: 7,408, Conversion time: 00:00.30</p>
<p>The previous conversion time was 00:00.65.</p>
<p>&#160;</p>
<h1>Wrapping Up</h1>
<p>I&#8217;ll be releasing updated documentation and videos in the coming days to show the functionality and usage.</p>
<p>I&#8217;ll also be conducting a free webinar sometime in the near future to discuss the process of migrating your JavaScript from CRM 4.0 to CRM 2011.    </p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2012/07/11/crm-javascript-conversion-assistant-2-0-released-new-name-new-features-new-price/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Marketing List Manager 2011 price reduction</title>
		<link>http://www.crmaccelerators.net/2012/06/30/marketing-list-manager-2011-price-reduction/</link>
		<comments>http://www.crmaccelerators.net/2012/06/30/marketing-list-manager-2011-price-reduction/#comments</comments>
		<pubDate>Sat, 30 Jun 2012 14:51:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=185</guid>
		<description><![CDATA[I&#8217;ve decided to drop the price of my Marketing List Manager for Dynamics CRM 2011 to $98 ( from $249 ). For more information, visit the product page.]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve decided to drop the price of my Marketing List Manager for Dynamics CRM 2011 to $98 ( from $249 ).</p>
<p>For more information, visit the product <a href="http://www.crmaccelerators.net/products/marketing-list-manager-for-crm-2011/" target="_blank">page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2012/06/30/marketing-list-manager-2011-price-reduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgraded JavaScript and OptionSet values</title>
		<link>http://www.crmaccelerators.net/2012/05/13/upgraded-javascript-and-optionset-values/</link>
		<comments>http://www.crmaccelerators.net/2012/05/13/upgraded-javascript-and-optionset-values/#comments</comments>
		<pubDate>Sun, 13 May 2012 17:45:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[DynamicsCRM]]></category>
		<category><![CDATA[Upgrade to CRM 2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://www.crmaccelerators.net/?p=182</guid>
		<description><![CDATA[In CRM 4.0 the values returned from a Picklist were integers represented as strings. If you were referring to a Picklist value, you would refer to it like this: &#160; if (crmForm.all.new_picklist.DataValue == &#34;2&#34;) { // do something } In CRM 2011, the OptionSet value is returned as a true integer so the following code [...]]]></description>
				<content:encoded><![CDATA[<p>In CRM 4.0 the values returned from a Picklist were integers represented as strings. If you were referring to a Picklist value, you would refer to it like this:</p>
<p>&#160;</p>
<p><span style="color: blue">
<pre class="code"><span style="color: blue">if </span>(crmForm.all.new_picklist.DataValue == <span style="color: maroon">&quot;2&quot;</span>)
{
    <span style="color: #006400">// do something 
</span>}</pre>
<p>  </span></p>
<p>In CRM 2011, the OptionSet value is returned as a true integer so the following code (converted into CRM 2011 object model) will not work:</p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">if </span>(Xrm.Page.getAttribute(<span style="color: maroon">&quot;new_picklist&quot;</span>).getValue() == <span style="color: maroon">&quot;2&quot;</span>)
{
    <span style="color: #006400">// do something 
</span>}</pre>
<p>You need to modify it so the equality operator looks like this:</p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">if </span>(Xrm.Page.getAttribute(<span style="color: maroon">&quot;new_picklist&quot;</span>).getValue() == 2)
{
    <span style="color: #006400">// do something 
</span>}</pre>
<p>This is something very important to remember and something that has cost me me quite a bit of debugging time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.crmaccelerators.net/2012/05/13/upgraded-javascript-and-optionset-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
