<?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>Mitch Milam&#039;s Dynamics CRM and xRM Discussions &#187; Development</title>
	<atom:link href="http://blogs.infinite-x.net/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.infinite-x.net</link>
	<description>Sharing information with Dynamics CRM users and xRM developers</description>
	<lastBuildDate>Wed, 08 Feb 2012 16:27:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Free Plugin Configuration Solution Released</title>
		<link>http://blogs.infinite-x.net/2012/02/08/free-plugin-configuration-solution-released/</link>
		<comments>http://blogs.infinite-x.net/2012/02/08/free-plugin-configuration-solution-released/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 15:36:00 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/?p=1221</guid>
		<description><![CDATA[I updated my Plugin Configuration solution to work as a real solution within Dynamics CRM 2011. You will find it on the Free Solutions page. Included in the zip file are: An unmanaged solution A managed solution Sample code ( below ) &#160; Usage: Perform the following steps to add the solution to your system: [...]]]></description>
			<content:encoded><![CDATA[<p>I updated my <a href="http://blogs.msdn.com/crm/archive/2008/11/14/part-deux-storing-configuration-data-for-microsoft-dynamics-crm-plug-ins.aspx" target="_blank">Plugin Configuration</a> solution to work as a real solution within Dynamics CRM 2011.</p>
<p>You will find it on the <a href="http://blogs.infinite-x.net/free-utilities/" target="_blank">Free Solutions</a> page.</p>
<p>Included in the zip file are:</p>
<ul>
<li>An unmanaged solution</li>
<li>A managed solution</li>
<li>Sample code ( below )</li>
</ul>
<p>&#160;</p>
<h2>Usage:</h2>
<p>Perform the following steps to add the solution to your system:</p>
<p>1. Import the solution into CRM. In the Settings area, you&#039;ll find a <strong>Plugin Settings</strong> link.</p>
<p>2. Add a record to specify a plugin configuration setting. There are three parameters:</p>
<ul>
<li>Plugin Name</li>
<li>Setting Name</li>
<li>Setting Value</li>
</ul>
<p>As shown in the figure below:</p>
<p><a href="http://blogs.infinite-x.net/wp-content/uploads/2012/02/image.png"><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://blogs.infinite-x.net/wp-content/uploads/2012/02/image_thumb.png" width="504" height="475" /></a></p>
<p>&#160;</p>
<p>In your plugin, you&#039;ll need to add a method to extract get your setting:</p>
<pre class="code"><span style="color: blue">public static string </span>GetPluginConfigSetting(IOrganizationService service, </pre>
<pre class="code">                       <span style="color: blue">string </span>pluginName, </pre>
<pre class="code">                       <span style="color: blue">string </span>pluginSettingName)
{
    <span style="color: blue">var </span>queryByAttribute = <span style="color: blue">new </span>QueryByAttribute(<span style="color: #a31515">&quot;m3_pluginsetting&quot;</span>);
    queryByAttribute.Attributes.AddRange(<span style="color: blue">new </span>[] { <span style="color: #a31515">&quot;m3_pluginname&quot;</span>, <span style="color: #a31515">&quot;m3_settingname&quot; </span>} );
    queryByAttribute.Values.AddRange(<span style="color: blue">new object</span>[] { pluginName, pluginSettingName });
    queryByAttribute.ColumnSet = <span style="color: blue">new </span>ColumnSet();
    queryByAttribute.ColumnSet.AddColumn(<span style="color: #a31515">&quot;m3_settings&quot;</span>);

    <span style="color: blue">var </span>retrieved = service.RetrieveMultiple(queryByAttribute);

    <span style="color: blue">if </span>(retrieved.Entities.Count &gt; 0)
    {
        <span style="color: blue">return </span>retrieved.Entities[0].Attributes[<span style="color: #a31515">&quot;m3_settings&quot;</span>].ToString();
    }

    <span style="color: blue">throw new </span>InvalidPluginExecutionException(</pre>
<pre class="code">              <span style="color: #a31515">&quot;Unable to retrieve configuration settings.&quot;</span>);
}</pre>
<p>&#160;</p>
<p>This method is called like this:</p>
<pre class="code"><span style="color: red">UnsecureInformation </span>= <span style="color: red">GetPluginConfigSetting</span>(<span style="color: red">crmService</span>, <span style="color: #a31515">&quot;MyPlugin&quot;</span>,
                                            <span style="color: #a31515">&quot;ConnectionString&quot;</span>);</pre>
<p>&#160;</p>
<p>&#160;</p>
<h2>Alternatives</h2>
<p>The <a href="http://community.adxstudio.com/downloads/productivitypack" target="_blank">Adxstudio Productivity Pack for Dynamics CRM 2011</a> has a similar feature so that is an alternative if you need one.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2012/02/08/free-plugin-configuration-solution-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CRM Migration Assistant 1.3.3 Released</title>
		<link>http://blogs.infinite-x.net/2012/02/01/crm-migration-assistant-1-3-3-released/</link>
		<comments>http://blogs.infinite-x.net/2012/02/01/crm-migration-assistant-1-3-3-released/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 17:47:02 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[CRM2011]]></category>
		<category><![CDATA[MSCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/?p=1205</guid>
		<description><![CDATA[We have released a small update to the CRM Migration Assistant which includes the following updates: Added 0 and 1 as supported Submit Options Fixed issues with converting .AddOption to .addOption method. Conversion alerts were added for the following JavaScript properties: .title .vAlign .contentEditable .innerText Any .style property that is not either display or visible [...]]]></description>
			<content:encoded><![CDATA[<p>We have released a small update to the CRM Migration Assistant which includes the following updates:</p>
<ol>
<li>Added 0 and 1 as supported Submit Options</li>
<li>Fixed issues with converting .AddOption to .addOption method.</li>
<li>Conversion alerts were added for the following JavaScript properties:</li>
</ol>
<ul>
<li>.title</li>
<li>.vAlign</li>
<li>.contentEditable</li>
<li>.innerText</li>
</ul>
<ol>
<li>Any .style property that is not either <strong>display</strong> or <strong>visible</strong> is now marked as a conversion issue. This is to help identify instances where people have created unsupported code which will probably not work within the CRM 2011 environment.</li>
<li>The use of document.all.mnuBar1 now produces a conversion alert.</li>
<li>Instances of the DOM element <strong>&#039;Notifications&#039;</strong> will cause a conversion alert will be generated. This is a special CRM form element at the top of each data entry form that shows alerts to the user. For more information on using this technique, see this <a href="http://community.dynamics.com/product/crm/crmtechnical/b/crmmarcoamoedoeng/archive/2009/06/09/show-custom-warning-messages-on-microsoft-dynamics-crm.aspx" target="_blank">article</a>.</li>
</ol>
<p>&nbsp;</p>
<p>You may download the new package <a href="http://www.crmaccelerators.net/products/crm-migration-assistant-2/crm-migration-assistant-demo-request/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2012/02/01/crm-migration-assistant-1-3-3-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Machine Tip &#039;o the Day: Removing Integration Services</title>
		<link>http://blogs.infinite-x.net/2012/01/31/virtual-machine-tip-o-the-day-removing-integration-services/</link>
		<comments>http://blogs.infinite-x.net/2012/01/31/virtual-machine-tip-o-the-day-removing-integration-services/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 22:25:08 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/?p=1203</guid>
		<description><![CDATA[If you ever need to move a virtual machine from Virtual PC to Virtual Server, you need to uninstall the Integration Services before you attempt to connect it to Virtual Server. Each product has their own version and they are not compatible. Also, once the VM is up and running in Virtual Server, you can&#039;t [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to move a virtual machine from Virtual PC to Virtual Server, you need to uninstall the Integration Services before you attempt to connect it to Virtual Server.</p>
<p>Each product has their own version and they are not compatible.</p>
<p>Also, once the VM is up and running in Virtual Server, you can&#039;t uninstall the Virtual PC Integration Services ( at least I&#039;ve never been able to find a way ).</p>
<blockquote><p>Note: There may be tools that do this, but I&#039;m not aware of any. So if you know something I don&#039;t please put a comment on this article.</p>
</blockquote>
<p>Finally, make sure you consolidate any snapshot images and do a clean reboot and final shutdown before you begin your move.</p>
<p>You&#039;ll be much happier in the long run.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2012/01/31/virtual-machine-tip-o-the-day-removing-integration-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sandboxed Plugin Development: HtmlDecode Tidbit</title>
		<link>http://blogs.infinite-x.net/2012/01/27/sandboxed-plugin-development-htmldecode-tidbit/</link>
		<comments>http://blogs.infinite-x.net/2012/01/27/sandboxed-plugin-development-htmldecode-tidbit/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 22:48:03 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[MSCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/?p=1197</guid>
		<description><![CDATA[When working with things like Email, it is sometimes necessary to decode a string of text that has been HTML-encoded. This is the process where special characters are replaced with their numerical equivalents to prevent misinterpretation of the HTML text. You use it like this: string xmlPacket = HttpUtility.HtmlDecode(input); This method is found inside of [...]]]></description>
			<content:encoded><![CDATA[<p>When working with things like Email, it is sometimes necessary to decode a string of text that has been HTML-encoded. This is the process where special characters are replaced with their numerical equivalents to prevent misinterpretation of the HTML text.</p>
<p>You use it like this:</p>
<blockquote><p>string xmlPacket = HttpUtility.HtmlDecode(input);</p>
</blockquote>
<p>This method is found inside of System.Web, which seems to require full trust to run properly.</p>
<p>Since I&#039;m running in the sandbox, I can only use partial trust assemblies.</p>
<p>Thankfully, the System.Net assembly has: WebUtility.HtmlDecode, which works exactly the same AND doesn&#039;t cause us security issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2012/01/27/sandboxed-plugin-development-htmldecode-tidbit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting to CRM 2011 JavaScript: Form Elements</title>
		<link>http://blogs.infinite-x.net/2012/01/27/converting-to-crm-2011-javascript-form-elements/</link>
		<comments>http://blogs.infinite-x.net/2012/01/27/converting-to-crm-2011-javascript-form-elements/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 08:06:00 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[CRM2011]]></category>
		<category><![CDATA[MSCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/?p=1195</guid>
		<description><![CDATA[One of the most fascinating things I found during the creation of the CRM Migration Assistant is the different methods developers use to access CRM form fields, and other form elements. Normally, people access a form field using the following style of JavaScript: crmForm.all.name This is the normal and perfectly acceptable (and supported) method for [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most fascinating things I found during the creation of the CRM Migration Assistant is the different methods developers use to access CRM form fields, and other form elements.</p>
<p>Normally, people access a form field using the following style of JavaScript:</p>
<blockquote><p>crmForm.all.name</p>
</blockquote>
<p>This is the normal and perfectly acceptable (and supported) method for referencing CRM form fields.</p>
<p>But, for various reasons, I&#039;ve also seen fields reference using these crmForm methods:</p>
<blockquote><p>crmForm.name     <br />crmForm.elements[&quot;name&quot;]      <br />crmForm.all[&quot;name&quot;]      <br />crmForm[&quot;name&quot;]</p>
</blockquote>
<p>This is perfectly acceptable JavaScript and the CRM 4.0 object model had no objection to this practice, so all of these methods seemed to work.</p>
<p>In fact, accessing CRM form fields using the JavaScript <strong>document</strong> object using these methods worked as well:</p>
<blockquote><p>document.all(&quot;name_c&quot;)     <br />document.all[&quot;name&quot;]      <br />document.getElementById(&quot;name_c&quot;)</p>
</blockquote>
<p>The real question is: Will these methods continue to work when the organization is upgraded to CRM 2011?</p>
<p>The answer is: If you have used standard and supported methods within your JavaScript, then yes, the code will be supported. </p>
<p>This means referencing all of your form fields using the standard access model:</p>
<blockquote><p>crmForm.all.name</p>
</blockquote>
<p>Other options may or may not work correctly. Your experience my vary depending on which of the above methods were used.</p>
<p>Fortunately, the CRM Migration Assistant converts all of these &quot;unsupported&quot; form field access types into fully-supported CRM 2011 code using Xrm.Page.getAttribute and Xrm.Page.getControl, depending on how the field was being used.</p>
<p>If you haven&#039;t already, download the trial version of the <a href="http://www.crmaccelerators.net/products/crm-migration-assistant-2/" target="_blank">CRM Migration Assistant</a> and convert some of your questionable JavaScript through the conversion process.</p>
<p>If you run into any conversion issues, send me a code sample so that I can update the conversion process.   </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2012/01/27/converting-to-crm-2011-javascript-form-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging Sandboxed Plugins</title>
		<link>http://blogs.infinite-x.net/2012/01/23/debugging-sandboxed-plugins/</link>
		<comments>http://blogs.infinite-x.net/2012/01/23/debugging-sandboxed-plugins/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 08:12:00 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[CRM2011]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/?p=1193</guid>
		<description><![CDATA[I learned some interesting things about working with Sandboxed plugins last week that I thought I&#039;d share. Attaching to Processes Sandboxed plugins are run by Microsoft.Crm.Sandbox.WorkerProcess.exe so that is the process that you will need to attach to in order to debug your plugin.&#160; If there are more than one, then attach to all of [...]]]></description>
			<content:encoded><![CDATA[<p>I learned some interesting things about working with Sandboxed plugins last week that I thought I&#039;d share.</p>
<h2>Attaching to Processes</h2>
<p>Sandboxed plugins are run by <strong>Microsoft.Crm.Sandbox.WorkerProcess.exe</strong> so that is the process that you will need to attach to in order to debug your plugin.&#160; If there are more than one, then attach to all of them.</p>
<p>If there are none active in memory, perform whatever process that activates your plugin and the Sandbox HostService will activate at least one. Then you can attach to them.</p>
<p>If you are running a sandboxed plugin with an asynchronous step, you will also need to attach to <strong>CrmAsyncService.exe</strong> since this process is involved as well. More on that in a minute.</p>
<p>&#160;</p>
<h2>Using the Debugger</h2>
<p>The Sandbox HostService only allows the WorkerProcess to process for 30 seconds. If it runs longer, it is terminated. This is a real problem when you&#039;re trying to look at data within the debugger and your code and data disappears in front of your eyes.</p>
<p>Add a DWORD key called <strong>SandboxDebugPlugins</strong> with a value of 1 to the MSCRM registry to prevent the process from being abnormally terminated.</p>
<p>&#160;</p>
<h2>Asynchronous Plugin Steps</h2>
<p>A very interesting factoid is that if you have an asynchronous step inside of the sandbox plug, the processing of the step is different:</p>
<p>The CrmAsyncService.exe process will run your asynchronous step as it would any other async process but since it is from a sandboxed plugin, it will actually hand your plugin to the Sandbox process for execution.</p>
<p>This is why you must attach to <strong>both</strong> the <strong>Microsoft.Crm.Sandbox.WorkerProcess.exe </strong>and <strong>CrmAsyncService.exe</strong> in order to get the Visual Studio debugger to launch.</p>
<p>&#160;</p>
<h2>More Information</h2>
<p>See this <a href="http://msdn.microsoft.com/en-us/library/gg328574.aspx" target="_blank">topic</a> in the CRM SDK for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2012/01/23/debugging-sandboxed-plugins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CRM SDK Deep Dive: Error Codes</title>
		<link>http://blogs.infinite-x.net/2012/01/18/crm-sdk-deep-dive-error-codes/</link>
		<comments>http://blogs.infinite-x.net/2012/01/18/crm-sdk-deep-dive-error-codes/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 10:36:48 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[CRM2011]]></category>
		<category><![CDATA[MSCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/?p=1189</guid>
		<description><![CDATA[As I was reviewing notes from the recently released CRM SDK 5.0.9, I noticed a section on Error Codes.&#160; &#34;This looks interesting,&#34; I thought. After you have installed the CRM SDK, navigate to the following folder: sdk\samplecode\cs\helpercode In that folder you will find, among other things, three files related to error codes, each in a [...]]]></description>
			<content:encoded><![CDATA[<p>As I was reviewing notes from the recently released CRM SDK 5.0.9, I noticed a section on Error Codes.&#160; &quot;This looks interesting,&quot; I thought.</p>
<p>After you have installed the CRM SDK, navigate to the following folder:</p>
<blockquote><p>sdk\samplecode\cs\helpercode</p>
</blockquote>
<p>In that folder you will find, among other things, three files related to error codes, each in a different format. It appears that there are around 2,015 error codes.&#160; Wow, that&#039;s a lot of documentation!</p>
<h2>crmerrors.xlsx</h2>
<p>Is a Microsoft Excel worksheet formatted like this:</p>
<p><a href="http://blogs.infinite-x.net/wp-content/uploads/2012/01/image12.png"><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://blogs.infinite-x.net/wp-content/uploads/2012/01/image_thumb12.png" width="504" height="123" /></a></p>
<h2>errorcodes.cs</h2>
<p>Is a C# class that has the error codes inside of a class that you can incorporate into your applications. The code starts off like this:</p>
<p><span style="color: blue">private static </span><span style="color: #2b91af">Hashtable </span>ErrorMessages = <span style="color: blue">new </span><span style="color: #2b91af">Hashtable</span>();    </p>
<p><span style="color: blue">static </span>ErrorCodes()    <br />{    <br />&#160;&#160;&#160; ErrorMessages.Add(InvalidAuth,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #a31515">&quot;Organization Authentication does not match the current discovery service Role.&quot;</span>);    <br />&#160;&#160;&#160; ErrorMessages.Add(CannotUpdateOrgDBOrgSettingWhenOffline,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #a31515">&quot;Organization Settings stored in Organization Database cannot be set when offline.&quot;</span>);    <br />&#160;&#160;&#160; ErrorMessages.Add(InvalidOrgDBOrgSetting,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #a31515">&quot;Invalid Organization Setting passed in. Please check the datatype and pass in an appropriate value.&quot;</span>);    <br />&#160;&#160;&#160; ErrorMessages.Add(UnknownInvalidTransformationParameterGeneric,    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #a31515">&quot;One or more input transformation parameter values are invalid: {0}.&quot;</span>);    <br />&#160;&#160;&#160; ErrorMessages.Add(InvalidTransformationParameterOutsideRangeGeneric,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #a31515">&quot;One or more input transformation parameter values are outside the permissible range: {0}.&quot;</span>);    </p>
<h2>crmerrors.xml</h2>
<p>The final version of the file is an XML which is formatted like this:</p>
<pre class="code"><span style="color: blue">
<pre class="code"><span style="color: blue">&lt;?</span><span style="color: #a31515">xml </span><span style="color: red">version</span><span style="color: blue">=</span>&quot;<span style="color: blue">1.0</span>&quot; <span style="color: red">encoding</span><span style="color: blue">=</span>&quot;<span style="color: blue">UTF-8</span>&quot; <span style="color: red">standalone</span><span style="color: blue">=</span>&quot;<span style="color: blue">yes</span>&quot;<span style="color: blue">?&gt;
&lt;</span><span style="color: #a31515">crmerrors </span><span style="color: red">xmlns:xsi</span><span style="color: blue">=</span>&quot;<span style="color: blue">http://www.w3.org/2001/XMLSchema-instance</span>&quot;<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">crmerror</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ErrorId</span><span style="color: blue">&gt;
      </span>80048516
    <span style="color: blue">&lt;/</span><span style="color: #a31515">ErrorId</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ManagedErrorName</span><span style="color: blue">&gt;
      </span>InvalidAuth
    <span style="color: blue">&lt;/</span><span style="color: #a31515">ManagedErrorName</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ErrorMessage</span><span style="color: blue">&gt;
      </span>Organization Authentication does not match the current discovery service Role.
    <span style="color: blue">&lt;/</span><span style="color: #a31515">ErrorMessage</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">crmerror</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">crmerror</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ErrorId</span><span style="color: blue">&gt;
      </span>80048515
    <span style="color: blue">&lt;/</span><span style="color: #a31515">ErrorId</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ManagedErrorName</span><span style="color: blue">&gt;
      </span>CannotUpdateOrgDBOrgSettingWhenOffline
    <span style="color: blue">&lt;/</span><span style="color: #a31515">ManagedErrorName</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ErrorMessage</span><span style="color: blue">&gt;
      </span>Organization Settings stored in Organization Database cannot be set when offline.
    <span style="color: blue">&lt;/</span><span style="color: #a31515">ErrorMessage</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">crmerror</span><span style="color: blue">&gt;

</span></pre>
<p></span></pre>
<pre class="code"><span style="color: blue"></span></pre>
<p>Regardless of how you use it, these files are a great resource for any CRM developer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2012/01/18/crm-sdk-deep-dive-error-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CRM SDK Deep Dive: Plugin Messages Support</title>
		<link>http://blogs.infinite-x.net/2012/01/17/crm-sdk-deep-dive-plugin-messages-support/</link>
		<comments>http://blogs.infinite-x.net/2012/01/17/crm-sdk-deep-dive-plugin-messages-support/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 08:44:00 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[Customization]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[CRM2011]]></category>
		<category><![CDATA[MSCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/?p=1182</guid>
		<description><![CDATA[If you are developing a plugin, sooner or later you will need to do something in a plugin that requires &#34;listening&#34; to more than just Create, Read, Update, and Delete messages. What is a Message? If you are new to Dynamics CRM development, a Message word that is used to instruct CRM to do something. [...]]]></description>
			<content:encoded><![CDATA[<p>If you are developing a plugin, sooner or later you will need to do something in a plugin that requires &quot;listening&quot; to more than just Create, Read, Update, and Delete messages.</p>
<h3>What is a Message?</h3>
<p>If you are new to Dynamics CRM development, a Message word that is used to instruct CRM to do something. As far as I can tell, since the early versions of the CRM SDK used the SOAP protocol exclusively, and SOAP passes messages, the term message became the standard name for CRM internal processing options</p>
<blockquote><p><font style="background-color: #ffffff">If anyone has any other explanation, please let me know and I&#039;ll update the post.</font></p>
</blockquote>
<h3>What do you do with Messages?</h3>
<p>Messages are what a plugin &quot;listens for&quot; to know when to activate and perform whatever job it was programmed to do.</p>
<p>A Message is associated with a Plugin Step ( internally called a SdkMessageProcessingStep ), which is a pointer that associates your plugin code to a Dynamics CRM internal action.</p>
<p>Inside the Plugin Registration Tool, you may see something like this:</p>
<p><a href="http://blogs.infinite-x.net/wp-content/uploads/2012/01/image8.png"><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://blogs.infinite-x.net/wp-content/uploads/2012/01/image_thumb8.png" width="504" height="162" /></a></p>
<p>As you can see, I have an assembly called <strong>ClassLibrary1</strong>, within that assembly I have a single plugin, <strong>SamplePlugin</strong>, and that plugin has two steps:</p>
<ol>
<li>Create of a queueitem</li>
<li>Create of an email</li>
</ol>
<p><strong>Create</strong> is the Message.</p>
<p>&#160;</p>
<h3>How do I make it GO?</h3>
<p>So, how do you, as a plugin developer, figure out what message you need to use to properly configure your plugin?</p>
<p>Well, for the most part, it&#039;s pretty simple: You select the CRM operation you are interested in intercepting then select Entity that will be associated with that Message.</p>
<p>Here is how the configuration looks within the Plugin Registration Tool:</p>
<p><a href="http://blogs.infinite-x.net/wp-content/uploads/2012/01/image9.png"><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://blogs.infinite-x.net/wp-content/uploads/2012/01/image_thumb9.png" width="504" height="285" /></a></p>
<p>&#160;</p>
<h3>But what if I don&#039;t know what message to use?</h3>
<p>Excellent question, and the reason for my article.</p>
<p>The very fine folks in the Dynamics CRM documentation team have created for us, an Excel worksheet that lists all of the messages associated with a CRM Entity.</p>
<p>After you install the CRM SDK, you&#039;ll find the worksheet here:</p>
<blockquote><p>sdk\tools\message-entity support for plug-ins.xlsx</p>
</blockquote>
<p>And here is how it looks:</p>
<p><a href="http://blogs.infinite-x.net/wp-content/uploads/2012/01/image10.png"><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://blogs.infinite-x.net/wp-content/uploads/2012/01/image_thumb10.png" width="504" height="148" /></a></p>
<p>It lists the following information:</p>
<ul>
<li>Message Name</li>
<li>Primary Entity</li>
<li>Secondary Entity</li>
<li>Message Availability</li>
<ul>
<li>Server or </li>
<li>Both – for Client and Server</li>
</ul>
<li>Entity Supported Deployment</li>
<ul>
<li>Server or </li>
<li>Both – for Client and Server</li>
</ul>
</ul>
<h3>How do I use it?</h3>
<p>Usually, I know what Entity I am going to work with so I start there and filter the <u>Primary Entity</u> based on that information.</p>
<p>Next, I try and locate the <u>Message Name</u> that I might need. Now this sounds simple, but in certain cases, it&#039;s really hard to determine what exact message you should connect with.</p>
<p>In that case, I will sometimes create steps that monitor each possible message, connect my debugger to IIS, then execute the CRM operation of interest so that I see what message is actually being passed through to my plugin.</p>
<p>You can find the message in the Execution Context&#039;s <a href="http://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.ipluginexecutioncontext_properties.aspx" target="_blank">MessageName</a> property.</p>
<p>&#160;</p>
<h3>Option 2</h3>
<p>A second option is to look in the SDK help file itself for topics like: </p>
<blockquote><p>Email (E-mail) Entity Messages and Methods</p>
</blockquote>
<p>Where you will find information like this:</p>
<p><a href="http://blogs.infinite-x.net/wp-content/uploads/2012/01/image11.png"><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://blogs.infinite-x.net/wp-content/uploads/2012/01/image_thumb11.png" width="404" height="316" /></a></p>
<p>This should be the same (mostly) list of Messages found in the Excel file. Just remove the word &quot;Request&quot; from the end of the Message Name found in the SDK help file and you should have a match.</p>
<p>&#160;</p>
<h3>Conclusion</h3>
<p>Well, that&#039;s about it for today. Hopefully this will help you in your plugin development efforts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2012/01/17/crm-sdk-deep-dive-plugin-messages-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CRM 2011 SDK Development and Microsoft.IdentityModel Assembly</title>
		<link>http://blogs.infinite-x.net/2011/11/30/crm-2011-sdk-development-and-microsoft-identitymodel-assembly-2/</link>
		<comments>http://blogs.infinite-x.net/2011/11/30/crm-2011-sdk-development-and-microsoft-identitymodel-assembly-2/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 08:47:00 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[CRM 2011]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dynamics CRM]]></category>
		<category><![CDATA[MSCRM]]></category>
		<category><![CDATA[MSCRM2011]]></category>
		<category><![CDATA[MSDYNCRM]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/2011/11/30/crm-2011-sdk-development-and-microsoft-identitymodel-assembly-2/</guid>
		<description><![CDATA[This is actually a repost from this article, but it seems a lot of people are running into the error so I thought I&#039;d repost it. If you plan on writing anything that uses the CRM 2011 SDK, you may at some point run into the following error message: The application terminated with an error. [...]]]></description>
			<content:encoded><![CDATA[<p>This is actually a repost from this <a href="http://blogs.infinite-x.net/2010/11/29/crm-2011-sdk-development-and-microsoft-identitymodel-assembly/" target="_blank">article</a>, but it seems a lot of people are running into the error so I thought I&#039;d repost it.</p>
<hr />
<p>If you plan on writing anything that uses the CRM 2011 SDK, you may at some point run into the following error message:</p>
<blockquote><p>The application terminated with an error.      <br />Could not load file or assembly &#039;Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&#039; or one of its dependencies. The system cannot find the file specified.</p>
</blockquote>
<h4>Solution:</h4>
<p>You need to install the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=EB9C345F-E830-40B8-A5FE-AE7A864C4D76">Windows Identity Foundation</a> which contains a referenced assembly then add that assembly as a reference to your project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2011/11/30/crm-2011-sdk-development-and-microsoft-identitymodel-assembly-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ILMerge and StackOverflowException</title>
		<link>http://blogs.infinite-x.net/2011/10/13/ilmerge-and-stackoverflowexception/</link>
		<comments>http://blogs.infinite-x.net/2011/10/13/ilmerge-and-stackoverflowexception/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 22:14:25 +0000</pubDate>
		<dc:creator>Mitch Milam</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blogs.infinite-x.net/2011/10/13/ilmerge-and-stackoverflowexception/</guid>
		<description><![CDATA[I was working away this afternoon upgrading one of my products to CRM 2011 when I encountered a very odd error message while using ILMerge: Process is terminated due to StackOverflowException. This was very odd because I had the ILMerge command running as part of a Post-Build process which had worked correctly all day.&#160; Then [...]]]></description>
			<content:encoded><![CDATA[<p>I was working away this afternoon upgrading one of my products to CRM 2011 when I encountered a very odd error message while using <a href="http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx" target="_blank">ILMerge</a>:</p>
<blockquote><p>Process is terminated due to StackOverflowException.</p>
</blockquote>
<p>This was very odd because I had the ILMerge command running as part of a Post-Build process which had worked correctly all day.&#160; Then it stopped.</p>
<p>The only change that was made to my machine was an update to Apple&#039;s iTunes software.&#160; No idea if that is what caused it but that was all that changed.&#160; And I even tried rebooting, without effect.</p>
<p>Finally, I found the answer <a href="http://nitoprograms.blogspot.com/2010/09/using-ilmerge-with-net-40-andor-rx.html" target="_blank">here</a>.</p>
<p>This made my Post-Build command look like this:</p>
<blockquote><p>if $(ConfigurationName) == Release      <br />&quot;$(ProgramFiles)\Microsoft\Ilmerge\Ilmerge.exe&quot;       <br /><strong>/targetplatform:v4,&quot;%ProgramFiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0&quot;        <br /></strong>/keyfile:&quot;$(ProjectDir)$(AssemblyOriginatorKeyFile)&quot;       <br />/out:&quot;$(TargetDir)$(AssemblyName).Merged.dll&quot;       <br />&quot;$(TargetDir)$(AssemblyName).dll&quot;       <br />&quot;$(TargetDir)CRMAccelerators.Licensing.dll&quot;&#160; <br />/log:&quot;$(AssemblyName).ILMerge.log</p>
</blockquote>
<p>The command-line parameter /targetplatform was what fixed it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infinite-x.net/2011/10/13/ilmerge-and-stackoverflowexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

