<?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>Trace.WriteLine(_blogTitle);</title> <atom:link href="http://www.langalaxy.de/feed/" rel="self" type="application/rss+xml" /><link>http://www.langalaxy.de</link> <description>Random output</description> <lastBuildDate>Fri, 28 Oct 2011 17:20:03 +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>Cannot enter backslash key in forms using german keyboard</title><link>http://www.langalaxy.de/2011/10/cannot-enter-backslash-key-in-forms-using-german-keyboard/</link> <comments>http://www.langalaxy.de/2011/10/cannot-enter-backslash-key-in-forms-using-german-keyboard/#comments</comments> <pubDate>Fri, 07 Oct 2011 19:29:11 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[Bugs]]></category> <category><![CDATA[CRM 2011]]></category> <category><![CDATA[en]]></category> <category><![CDATA[Support]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=576</guid> <description><![CDATA[Last time I tried to create a new systemuser, which is mananged in an other domain as the CRM system, I wasn&#8217;t able ton enter a backslash key in the domain name field. After some investigation, it turned out that I was not able to enter \ in any field. I&#8217;ve reproduced this issue on [...]]]></description> <content:encoded><![CDATA[<p>Last time I tried to create a new systemuser, which is mananged in an other domain as the CRM system, I wasn&#8217;t able ton enter a backslash key in the domain name field.<br
/> After some investigation, it turned out that I was not able to enter \ in any field. I&#8217;ve reproduced this issue on multiple systems (On-Line and On-Premise) and multiple language packs.</p><p>With help of <a
href="http://twitter.com/nzregs">@nzregs</a> I could verify that it is not a general problem. After comparing system parameters, I found out that I was able to enter a backslash with an different keyboard layout than &#8216;de-de&#8217;. Therefore I opened a ticket with the CRM support which is currently under investigation. It looks like it is a bug in the default form scripts.</p><p>If you have to enter a backslash in the meantime and you are experiencing the described problem, you could either copy/paste it from anywhere or you could enter ALT + 92.</p><p><em>Update</em></p><p>This issue was confirmed as a bug. The fix will be released with Rollup 7, which is currently scheduled for March 2012.</p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2011/10/cannot-enter-backslash-key-in-forms-using-german-keyboard/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Help to build a new community for Microsoft Dynamics professionals</title><link>http://www.langalaxy.de/2011/09/help-to-build-a-new-community-for-microsoft-dynamics-professionals/</link> <comments>http://www.langalaxy.de/2011/09/help-to-build-a-new-community-for-microsoft-dynamics-professionals/#comments</comments> <pubDate>Thu, 08 Sep 2011 19:42:39 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[Community]]></category> <category><![CDATA[en]]></category> <category><![CDATA[stackexchange.com]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=552</guid> <description><![CDATA[Perhaps you know already the great StackExchange trilogy, consisting of stackoverflow.com, serverfault.com and superuser.com. These are community-driven Q&#38;A sites. The community has the possibility to create new Q&#38;A sites, based on the StackExchange &#8216;application&#8217; through proposals on Area 51 What makes these Q&#38;A sites way better than normal discussion boards is the ability to use [...]]]></description> <content:encoded><![CDATA[<p>Perhaps you know already the great StackExchange trilogy, consisting of <a
href="http://stackoverflow.com">stackoverflow.com</a>, <a
href="http://serverfault.com">serverfault.com</a> and <a
href="http://superuser.com">superuser.com</a>. These are community-driven Q&amp;A sites.</p><p>The community has the possibility to create new Q&amp;A sites, based on the StackExchange &#8216;application&#8217; through proposals on <a
href="http://area51.stackexchange.com/">Area 51</a></p><p>What makes these Q&amp;A sites way better than normal discussion boards is the ability to use them like a big wiki.<br
/> Useful content is pushed by votes of the community and is bubbling up, crap gets filtered out. Already posted information is editable for improving the overall quality.</p><p>The SharePoint community already got it&#8217;s site. <a
href="http://sharepoint.stackexchange.com">sharepoint.stackexchange.com</a> is in public beta since a few months and at the moment it looks like it could become a regular site.</p><p>You may think: why do we need yet another site, there are the MSDN forums, or x, y and z.<br
/> I could not answer this question better than this question explains it already <a
href="http://meta.sharepoint.stackexchange.com/q/199">meta.sharepoint.stackexchange.com/q/199</a>.</p><p>At least in my opinion, the MSDN forums evolved to an award hunting area. Many &#8216;experts&#8217; throw masses of answers on questions, without adding value to it (or even know the answer). Don&#8217;t get me wrong: this is not the majority, but it annoys me very much.  There is also no real way to promote valuable contributions, while devaluating the crap.</p><p>In addition the Creative Commons license guarantees that questions and answers are free to access, free to use and re-use (with attribution), and free to share… forever. So you will automatically create a knowledge base out of your contributions.</p><p>The more I use these sites, the more I miss a site which topic is the <a
href="http://www.microsoft.com/en-us/dynamics/default.aspx">Microsoft Dynamics product range</a>.</p><p><strong>If you are a Microsoft Dynamics professional, I would kindly ask you to support the current <a
href="http://bit.ly/npargZ">proposal for a Microsoft Dynamics Q&amp;A site</a></strong></p><p>In order to support this proposal, the first step we have to achieve is to get it into the commitment stage. Therefore we need 60 followers and votes for sample questions (you can follow the proposal via the link above). If we reach this milestone, the proposal will proceed to the commitment step.</p><p>If you are interested please help to create a new opportunity for your community. You know a colleague, who&#8217;s interested? Great, tell him about the proposal. Spread the word!</p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2011/09/help-to-build-a-new-community-for-microsoft-dynamics-professionals/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Using HttpUtility.UrlEncode in a plugin leads to a SecurityException</title><link>http://www.langalaxy.de/2011/05/using-httputility-urlencode-in-a-plugin-leads-to-a-securityexception/</link> <comments>http://www.langalaxy.de/2011/05/using-httputility-urlencode-in-a-plugin-leads-to-a-securityexception/#comments</comments> <pubDate>Wed, 18 May 2011 21:28:18 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[.NET-4]]></category> <category><![CDATA[CRM 2011]]></category> <category><![CDATA[en]]></category> <category><![CDATA[Hints]]></category> <category><![CDATA[Plugins]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=530</guid> <description><![CDATA[In a recent project I had to develop a plugin which is executed in the plugin sandbox. The sandbox restricts the rights plugins to a &#8216;safe&#8217; amount. See http://msdn.microsoft.com/en-us/library/gg334752.aspx for a description. According to the SDK, web request are allowed. Part of my task was to send a request to a web service which expects [...]]]></description> <content:encoded><![CDATA[<p>In a recent project I had to develop a plugin which is executed in the plugin sandbox. The sandbox restricts the rights plugins to a &#8216;safe&#8217; amount. See <a
href="http://msdn.microsoft.com/en-us/library/gg334752.aspx">http://msdn.microsoft.com/en-us/library/gg334752.aspx</a> for a description. According to the SDK, web request are allowed.</p><p>Part of my task was to send a request to a web service which expects data URL-encoded. Normally you would use following class (part of <code>System.Web</code>)</p><div
class="wp_syntax"><div
class="code"><pre class="csharp" style="font-family:monospace;">HttpUtility<span style="color: #008000;">.</span><span style="color: #0000FF;">UrlEncode</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;some data here&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div><p>I was surprised that this leads to a <code>SecurityException</code> if used in a sand-boxed plugin. The sandbox does not allow the use of this class.</p><p>Instead of rewriting the method (I hate reinventing the wheel&#8230;) I&#8217;ve searched for a replacement, and found</p><div
class="wp_syntax"><div
class="code"><pre class="csharp" style="font-family:monospace;">Uri<span style="color: #008000;">.</span><span style="color: #0000FF;">EscapeDataString</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;some data here&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div><p>which is usable in sand-boxed plugins. For my task the result was the same as with <code>UrlEncode</code>, however I am not sure I they are different in their results.</p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2011/05/using-httputility-urlencode-in-a-plugin-leads-to-a-securityexception/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Do I need that SPN?</title><link>http://www.langalaxy.de/2011/03/do-i-need-that-spn/</link> <comments>http://www.langalaxy.de/2011/03/do-i-need-that-spn/#comments</comments> <pubDate>Thu, 03 Mar 2011 19:22:07 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[CRM 2011]]></category> <category><![CDATA[CRM 4]]></category> <category><![CDATA[en]]></category> <category><![CDATA[Hints]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=522</guid> <description><![CDATA[One important thing that is often forgotten during/after the installation of Dynamics CRM is to properly set the SPNs for your service accounts (if necessary ). Here are three links which I often take as reference when we plan new deployments: http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-principal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx http://rc.crm.dynamics.com/rc/regcont/en_us/op/articles/configurespn.aspx#o45872 http://blog.sonomapartners.com/2007/04/kerberos_and_de.html]]></description> <content:encoded><![CDATA[<p>One important thing that is often forgotten during/after the installation of Dynamics CRM is to properly set the SPNs for your service accounts (if necessary <img
src='http://www.langalaxy.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br
/> Here are three links which I often take as reference when we plan new deployments:</p><ul><li><a
href="http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-principal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx">http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-principal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx</a></li><li><a
href="http://rc.crm.dynamics.com/rc/regcont/en_us/op/articles/configurespn.aspx#o45872">http://rc.crm.dynamics.com/rc/regcont/en_us/op/articles/configurespn.aspx#o45872</a></li><li><a
href="http://blog.sonomapartners.com/2007/04/kerberos_and_de.html">http://blog.sonomapartners.com/2007/04/kerberos_and_de.html</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2011/03/do-i-need-that-spn/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Howto: extend the maximum value for duration attributes</title><link>http://www.langalaxy.de/2011/01/howto-extend-the-maximum-value-for-duration-attributes/</link> <comments>http://www.langalaxy.de/2011/01/howto-extend-the-maximum-value-for-duration-attributes/#comments</comments> <pubDate>Mon, 17 Jan 2011 21:21:35 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[CRM 4]]></category> <category><![CDATA[HowTo]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=450</guid> <description><![CDATA[If you have ever tried to enter a duration of more than 10 days for a service activity you would have seen that the system won&#8217;t accept this value. The duration of the appointment is invalid If you need to change the maximum value you are able to do this directly in the database (which [...]]]></description> <content:encoded><![CDATA[<p>If you have ever tried to enter a duration of more than 10 days for a service activity you would have seen that the system won&#8217;t accept this value.</p><blockquote><p>The duration of the appointment is invalid</p></blockquote><p>If you need to change the maximum value you are able to do this directly in the database (which is officially supported &#8211; quote of a support ticket below).</p><blockquote><ul><li>There is no way to modify the limit for service duration via UI. We will read this value from a SQL table and there we can change the default setting.</p><p>Database: [Organization]_MSCRM</p><p>Table: OrganizationBase</p><p>Field: MaxAppointmentDurationDays</p><p>Default value: 10</li><li>If you overwrite this value with the needed one (for example 20) and after that perform an IISReset, the known error message (&#8220;The duration of the appointment is invalid&#8221;) will no longer occur.<p>This change is the recommended solution from Microsoft CRM Support and will be supported.</li><li>Background: This field does come originally from CRM 3.0, where customer already provided feedback that the maximum duration of 10 days does not meet their need. The solution for CRM 3.0 was a solution implementation via registry key: Navigate to the following registry hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM. Create a registry key of type DWORD and name it &#8220;SchedulingEngine.MaxAppointmentDurationDays&#8221;. Provide a reasonable digit greater than 10 representing the number of days the service activity would be kept open and insure that the value is set to Decimal and not Hexadecimal. Now you can schedule an appointment with a duration value of more than 10 days.</li><li>For CRM 4.0 you will need a manual change of the according OrganisationBase entry. Exception: If you upgrade your CRM installation from CRM 3.0 to CRM4.0, the value will be automatically carried over</li></ul></blockquote><p>Another possibility to adjust this setting is to change the <a
href="http://msdn.microsoft.com/en-us/library/cc153634.aspx">organization.maxappointmentdurationdays Property</a> via the sdk.</p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2011/01/howto-extend-the-maximum-value-for-duration-attributes/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MissingMethodException at E-Mail-Router installation</title><link>http://www.langalaxy.de/2010/10/missingmethodexception-at-e-mail-router-installation/</link> <comments>http://www.langalaxy.de/2010/10/missingmethodexception-at-e-mail-router-installation/#comments</comments> <pubDate>Wed, 06 Oct 2010 18:38:05 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[CRM 4]]></category> <category><![CDATA[Hints]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=485</guid> <description><![CDATA[This week I&#8217;ve installed the E-Mail-Router for a customer. During the setup an error came up Action Microsoft.Crm.Setup.Exchange.GenerateEncryptionKeyAction failed. Method not found: &#8216;Boolean Microsoft.Crm.ApplicationConfig.IsFederalInformationProcessingCompliant()&#8217;. The cause of this error was a pending restart which was requested by Windows Update. I have no clue if a specific update was the cause of the problem, or the [...]]]></description> <content:encoded><![CDATA[<p>This week I&#8217;ve installed the E-Mail-Router for a customer. During the setup an error came up</p><blockquote><p>Action Microsoft.Crm.Setup.Exchange.GenerateEncryptionKeyAction failed.</p><p>Method not found: &#8216;Boolean Microsoft.Crm.ApplicationConfig.IsFederalInformationProcessingCompliant()&#8217;.</p></blockquote><p>The cause of this error was a pending restart which was requested by Windows Update. I have no clue if a specific update was the cause of the problem, or the system state itself.<br
/> However, after rebooting the machine, the error went away and the setup was successful.</p><p>So keep in mind, if the pre-checks warns you about a pending reboot, it is sometimes better not to ignore this hint <img
src='http://www.langalaxy.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2010/10/missingmethodexception-at-e-mail-router-installation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Manage Dynamics CRM 2011 with PowerShell</title><link>http://www.langalaxy.de/2010/09/manage-dynamics-crm-2011-with-powershell/</link> <comments>http://www.langalaxy.de/2010/09/manage-dynamics-crm-2011-with-powershell/#comments</comments> <pubDate>Mon, 27 Sep 2010 19:28:03 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[CRM 2011]]></category> <category><![CDATA[PowerShell]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=468</guid> <description><![CDATA[With the beta of Dynamics CRM 2011, Microsoft offers the ability to script deployment management tasks with PowerShell. The server role &#8216;Deployment Tools&#8217; contains a set of PowerShell cmdlets to script Deployment Manager tasks. After you have installed the Deployment Tools role you are able to add the Dynamics CRM PowerShell-Snap-In to your PowerShell session. [...]]]></description> <content:encoded><![CDATA[<p>With the beta of Dynamics CRM 2011, Microsoft offers the ability to script deployment management tasks with <a
href="http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx">PowerShell</a>.</p><p>The server role &#8216;Deployment Tools&#8217; contains a set of PowerShell cmdlets to script Deployment Manager tasks.</p><p>After you have installed the Deployment Tools role you are able to add the Dynamics CRM PowerShell-Snap-In to your PowerShell session.</p><p>To use the cmdlets you have to enter following command into a PowerShell console, which adds the PowerShell-Snap-In to your active session.</p><div
class="wp_syntax"><div
class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Add-PSSnapin</span> Microsoft.Crm.PowerShell</pre></div></div><p>After this the CRM Snap-In will be listed when you enter this command</p><div
class="wp_syntax"><div
class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-PSSnapIn</span></pre></div></div><p>Make sure that the result contains</p><blockquote><p>Name        : Microsoft.Crm.PowerShell<br
/> PSVersion   : 2.0<br
/> Description : A Windows PowerShell snap-in containing cmdlets that manage components of Microsoft Dynamics CRM.</p></blockquote><p>Now, you can view the cmdlets which are defined in the Snap-In with following command</p><div
class="wp_syntax"><div
class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008080; font-weight: bold;">Get-Command</span> <span style="color: pink;">-</span>Module Microsoft.Crm.PowerShell</pre></div></div><p>At the moment of writing this post, following cmdlets are available</p><blockquote><p>Disable-CrmOrganization<br
/> Disable-CrmServer<br
/> Edit-CrmOrganization<br
/> Enable-CrmOrganization<br
/> Enable-CrmServer<br
/> Get-CrmCertificate<br
/> Get-CrmDefaultOrganization<br
/> Get-CrmDeploymentAdministrator<br
/> Get-CrmEtmSettings<br
/> Get-CrmOrganization<br
/> Get-CrmServer<br
/> Get-CrmSetting<br
/> Get-CrmThrottleSettings<br
/> Import-CrmOrganization<br
/> New-CrmDeploymentAdministrator<br
/> New-CrmOrganization<br
/> Remove-CrmCertificate<br
/> Remove-CrmDeploymentAdministrator<br
/> Remove-CrmOrganization<br
/> Remove-CrmServer<br
/> Set-CrmCertificate<br
/> Set-CrmEtmSettings<br
/> Set-CrmSetting<br
/> Set-CrmThrottleSettings<br
/> Update-CrmOrganization</p></blockquote><p>This is a great enhancement for managing a crm deployment. You can speed up your administrative tasks, if you add this Snap-In to your profile. See <a
href="http://technet.microsoft.com/en-us/library/dd315342.aspx">http://technet.microsoft.com/en-us/library/dd315342.aspx</a></p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2010/09/manage-dynamics-crm-2011-with-powershell/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Why OptimizeOrgImport is not always an optimization</title><link>http://www.langalaxy.de/2010/07/why-optimizeorgimport-is-not-always-an-optimization/</link> <comments>http://www.langalaxy.de/2010/07/why-optimizeorgimport-is-not-always-an-optimization/#comments</comments> <pubDate>Mon, 12 Jul 2010 20:18:17 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[CRM 4]]></category> <category><![CDATA[Hints]]></category> <category><![CDATA[Import]]></category> <category><![CDATA[Tracing]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=447</guid> <description><![CDATA[Update Rollup 8 introduced an improved organization import process which speeds up the organization import. You have to enable the optimized import process by adding the DWORD key OptimizeOrgImport with value 1 to the registry hive of Dynamics CRM (see the detailed description http://support.microsoft.com/kb/977867) Recently, I had a problem during an import of an organization [...]]]></description> <content:encoded><![CDATA[<p>Update Rollup 8 introduced an improved organization import process which speeds up the organization import.</p><p>You have to enable the optimized import process by adding the <em>DWORD</em> key <em>OptimizeOrgImport</em> with value <em>1</em> to the registry hive of Dynamics CRM (see the detailed description <a
href="http://support.microsoft.com/kb/977867/">http://support.microsoft.com/kb/977867</a>)</p><p>Recently, I had a problem during an import of an organization which failed with following error</p><blockquote><p>Message: Exception during import of organization (Name=&#8217;<em><orgname></orgname></em>&#8216;, Id=3e58a0cc-c277-df11-b2c1-0050569473db):<br
/> System.Data.SqlClient.SqlException: A row with a duplicate key cannot be added to the object ‘dbo.SystemUserOrganizations’-object with unique index ‘SystemUserOrganizations_CrmUserId’</p></blockquote><p>The organization which I tried to import was a backup of an organization which was created in the same deployment. The import runs successful on every other deployment. With help of the Microsoft Support, we identified the cause of the issue: the OptimizeOrgImport key.</p><p>The knowledgebase article for <em><a
href="http://support.microsoft.com/kb/977867">OptimizeOrgImport</a></em> contains following passage:</p><blockquote><p>When you use the registry entry OptimizeOrgImport and have the value of this entry set to 1, you cannot import the same organization database more than one time.<br
/> If you want to import the same organization database more than one time, you must do one of the following things:</p><ul><li>Set OptimizeOrgImport = 0 and use the normal import process.</li><li>Delete the organization, and then import the organization again.</li></ul></blockquote><p>This passage is a little bit misleading, as the optimized import process fails already at the first time, if the organization was created in the same deployment. In order to import a backup of an organization into the originating deployment, you have to deactivate <em>OptimizeOrgImport</em>.</p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2010/07/why-optimizeorgimport-is-not-always-an-optimization/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Howto: Use pre-generated Guids for records</title><link>http://www.langalaxy.de/2010/06/howto-use-pre-generated-guids-for-records/</link> <comments>http://www.langalaxy.de/2010/06/howto-use-pre-generated-guids-for-records/#comments</comments> <pubDate>Sat, 05 Jun 2010 13:00:53 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[CRM 4]]></category> <category><![CDATA[HowTo]]></category> <category><![CDATA[Plugins]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=433</guid> <description><![CDATA[A customer asked me recently if it is possible to get the id of a record in a pre-create plugin. By default, it is not possible because the record is not yet created at this point and has not got an id. However, Dynamics CRM allows you to create your own id for a record. [...]]]></description> <content:encoded><![CDATA[<p>A customer asked me recently if it is possible to get the id of a record in a pre-create plugin. By default, it is not possible because the record is not yet created at this point and has not got an id.</p><p>However, Dynamics CRM allows you to create your own id for a record. The primary key of a record is stored in its <a
href="http://msdn.microsoft.com/en-us/library/bb959605(v=MSDN.10).aspx">Key-Property</a>. On all default entities, for example account, the id property is marked as <em><strong>Valid for create</strong></em> (see <a
href="http://msdn.microsoft.com/en-us/library/cc151315(v=MSDN.10).aspx">accountid</a>). This means, the sdk allows you to pass your own id.</p><div
class="wp_syntax"><div
class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">Microsoft.Crm.Sdk</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> PreCreateKeyPlugin
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> PreCreateKeyPlugin <span style="color: #008000;">:</span> IPlugin
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> Execute<span style="color: #008000;">&#40;</span>IPluginExecutionContext context<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>IsPreCreate<span style="color: #008000;">&#40;</span>context<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>context<span style="color: #008000;">.</span><span style="color: #0000FF;">InputParameters</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Contains</span><span style="color: #008000;">&#40;</span>ParameterName<span style="color: #008000;">.</span><span style="color: #0000FF;">Target</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
                <span style="color: #008000;">&#123;</span>
                    DynamicEntity target <span style="color: #008000;">=</span> context<span style="color: #008000;">.</span><span style="color: #0000FF;">InputParameters</span><span style="color: #008000;">&#91;</span>ParameterName<span style="color: #008000;">.</span><span style="color: #0000FF;">Target</span><span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> DynamicEntity<span style="color: #008000;">;</span>
&nbsp;
                    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>target <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
                    <span style="color: #008000;">&#123;</span>
                        Guid customId <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Guid<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;{d7256b93-a5b5-45f9-9f2d-a1838279c35c}&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
                        target<span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;accountid&quot;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Key<span style="color: #008000;">&#40;</span>customId<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                    <span style="color: #008000;">&#125;</span>
                <span style="color: #008000;">&#125;</span>
            <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">bool</span> IsPreCreate<span style="color: #008000;">&#40;</span>IPluginExecutionContext context<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">return</span>  context<span style="color: #008000;">.</span><span style="color: #0000FF;">MessageName</span> <span style="color: #008000;">==</span> MessageName<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span> <span style="color: #008000;">&amp;&amp;</span> 
                    context<span style="color: #008000;">.</span><span style="color: #0000FF;">Stage</span> <span style="color: #008000;">==</span> MessageProcessingStage<span style="color: #008000;">.</span><span style="color: #0000FF;">BeforeMainOperationOutsideTransaction</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></div></div><p>If you register this plugin for pre-create on the account entity and create a new account, it will have the provided id.<br
/> <a
href="http://www.langalaxy.de/wp-content/uploads/2010/06/account.png"><img
src="http://www.langalaxy.de/wp-content/uploads/2010/06/account-300x74.png" alt="" title="Account" width="300" height="74" class="aligncenter size-medium wp-image-442" /></a></p><p>Please keep in mind, that you are in the responsibility to assign an new GUID for every execution of this plugin, but this should be clear when working with primary keys.</p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2010/06/howto-use-pre-generated-guids-for-records/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Howto: Get label for an attribute with JavaScript</title><link>http://www.langalaxy.de/2010/05/howto-get-label-for-an-attribute-with-javascript/</link> <comments>http://www.langalaxy.de/2010/05/howto-get-label-for-an-attribute-with-javascript/#comments</comments> <pubDate>Wed, 19 May 2010 19:49:23 +0000</pubDate> <dc:creator>ckeller</dc:creator> <category><![CDATA[Dynamics CRM]]></category> <category><![CDATA[CRM 4]]></category> <category><![CDATA[Form Scripting]]></category> <category><![CDATA[HowTo]]></category> <category><![CDATA[Javascript]]></category><guid
isPermaLink="false">http://www.langalaxy.de/?p=429</guid> <description><![CDATA[If you have to retrieve the label of an attribute in a form script, you have two options. The first one, is of course not supported, but quick and easy to implement. function GetFieldLabel&#40;fieldname&#41; &#123; var field = crmForm.all&#91;fieldname+ '_c'&#93;; &#160; if &#40;field != null&#41;&#123; return field.firstChild.firstChild.nodeValue; &#125; else &#123; return ''; &#125; &#125; &#160; [...]]]></description> <content:encoded><![CDATA[<p>If you have to retrieve the label of an attribute in a form script, you have two options. The first one, is of course not supported, but quick and easy to implement.</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> GetFieldLabel<span style="color: #009900;">&#40;</span>fieldname<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> field <span style="color: #339933;">=</span> crmForm.<span style="color: #660066;">all</span><span style="color: #009900;">&#91;</span>fieldname<span style="color: #339933;">+</span> <span style="color: #3366CC;">'_c'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>field <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> field.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">nodeValue</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>GetFieldLabel<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'subject'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>The other option is, to retrieve the label for the user language from the crm service. I will cover this in another article.</p> ]]></content:encoded> <wfw:commentRss>http://www.langalaxy.de/2010/05/howto-get-label-for-an-attribute-with-javascript/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 617/709 objects using disk: basic

Served from: www.langalaxy.de @ 2012-02-07 02:07:39 -->
