<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.inetium.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Paul Rausch</title><link>http://blogs.inetium.com/blogs/prausch/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008 (Build: 30417.1769)</generator><item><title>CRM QueryExpression Grouping Conditions</title><link>http://blogs.inetium.com/blogs/prausch/archive/2008/05/06/crm-queryexpression-grouping-conditions.aspx</link><pubDate>Tue, 06 May 2008 17:37:00 GMT</pubDate><guid isPermaLink="false">7346ef18-9fb1-4a4e-be41-9add5078176c:17295</guid><dc:creator>prausch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.inetium.com/blogs/prausch/rsscomments.aspx?PostID=17295</wfw:commentRss><comments>http://blogs.inetium.com/blogs/prausch/archive/2008/05/06/crm-queryexpression-grouping-conditions.aspx#comments</comments><description>&lt;p&gt;I had a scenario the other day where I need to use the CRM SDK to do a query simlar to this &amp;#39;WHERE column1 = value AND (column2=value1 OR column2=value2)&amp;#39; , this was pretty easy to accomplish once I understood difference between Filters and Conditions on the QueryExpression object.&amp;nbsp; Here is how the previous query maps out to Conditions and Filters.&lt;/p&gt;&lt;p&gt;column1 = value&amp;nbsp; //is a condition&lt;br /&gt;(column2=value1 OR column2=value2) //is a filter&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So basically the way to build it is to create a condition expression for&amp;nbsp; (column2=value1 OR column2=value2) and add that as a filter expression to the top level expression.&amp;nbsp; The following code demonstrates. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim column1Condition As New CRMService.ConditionExpression&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column1Condition.AttributeName = &amp;quot;column1&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column1Condition.Operator = CRMService.ConditionOperator.Equal&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column1Condition.Values = New Object() {value}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim column2Value1Condition As New CRMService.ConditionExpression&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column2Value1Condition.AttributeName = &amp;quot;column2&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column2Value1Condition.Operator = CRMService.ConditionOperator.Equal&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column2Value1Condition.Values = New Object() {value1}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim column2Value2Condition As New CRMService.ConditionExpression&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column2Value2Condition.AttributeName = &amp;quot;column2&amp;quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column2Value2Condition.Operator = CRMService.ConditionOperator.Equal&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column2Value2Condition.Values = New Object() {value2}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim qe As New CRMService.QueryExpression&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim secondLevelFilter As CRMService.FilterExpression = New CRMService.FilterExpression&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; secondLevelFilter.FilterOperator = CRMService.LogicalOperator.Or&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; secondLevelFilter.Conditions = New CRMService.ConditionExpression {column2Value1Condition, column2Value2Condition}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim topLevelFilter As CRMService.FilterExpression = New CRMService.FilterExpression&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topLevelFilter.FilterOperator = CRMService.LogicalOperator.And&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topLevelFilter.Conditions = New CRMService.ConditionExpression {column1Condition}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topLevelFilter.Filters = New CRMService.FilterExpression {secondLevelFilter}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qe.Criteria = topLevelFilter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.inetium.com/aggbug.aspx?PostID=17295" width="1" height="1"&gt;</description><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/.Net+Development/default.aspx">.Net Development</category><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/CRM/default.aspx">CRM</category><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/Web+Services/default.aspx">Web Services</category></item><item><title>Embedding a CRM view in a form using an IFrame</title><link>http://blogs.inetium.com/blogs/prausch/archive/2008/05/01/embedding-a-crm-view-in-a-form-using-an-iframe.aspx</link><pubDate>Thu, 01 May 2008 15:32:00 GMT</pubDate><guid isPermaLink="false">7346ef18-9fb1-4a4e-be41-9add5078176c:17145</guid><dc:creator>prausch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.inetium.com/blogs/prausch/rsscomments.aspx?PostID=17145</wfw:commentRss><comments>http://blogs.inetium.com/blogs/prausch/archive/2008/05/01/embedding-a-crm-view-in-a-form-using-an-iframe.aspx#comments</comments><description>&lt;p&gt;I recently created a custom child entity that I wanted to show both on the left side navigation and on the parent entity form itself in an Iframe.&amp;nbsp; Here are the steps I took to accomplish that.&amp;nbsp; This will also work for non-custom entity views that you would like to embed into a form.&amp;nbsp; This will display a full view in the contained Iframe with all the same button navigation as if you went the view directly in a new window.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1 : &lt;br /&gt;&lt;/strong&gt;Add an IFrame to your form and set the source to about:blank.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;br /&gt;&lt;/strong&gt;Open a parent entity in a detail view.&amp;nbsp; Select Ctl-N to open the detail view in a new browser, now view the source and find the view you want to embed in the left hand navigation.&amp;nbsp; Once you locate that in the HTML source grab the contentarea references in the loadArea(&amp;quot;&amp;quot;) function.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;br /&gt;&lt;/strong&gt;Add the following script to the onload event for the form that contains the Iframe(parent entity).&amp;nbsp; Replace the &amp;#39;contentarea&amp;#39; with the value from Step 2.&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;document.all.IFRAME_PartsFrame.src=&amp;quot;/sfa/conts/areas.aspx?oId=&amp;quot; + crmForm.ObjectId + &amp;quot;&amp;amp;oType=&amp;quot; + crmForm.ObjectTypeCode + &amp;quot;&amp;amp;security=852023&amp;amp;tabSet=&lt;em&gt;contentarea&lt;/em&gt;&amp;quot;;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.inetium.com/aggbug.aspx?PostID=17145" width="1" height="1"&gt;</description><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/CRM/default.aspx">CRM</category></item><item><title>Overriding the default generated WSDL on a service</title><link>http://blogs.inetium.com/blogs/prausch/archive/2008/04/14/overriding-the-default-generated-wsdl-on-a-service.aspx</link><pubDate>Mon, 14 Apr 2008 18:06:00 GMT</pubDate><guid isPermaLink="false">7346ef18-9fb1-4a4e-be41-9add5078176c:17057</guid><dc:creator>prausch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.inetium.com/blogs/prausch/rsscomments.aspx?PostID=17057</wfw:commentRss><comments>http://blogs.inetium.com/blogs/prausch/archive/2008/04/14/overriding-the-default-generated-wsdl-on-a-service.aspx#comments</comments><description>I recently came across a scenario where&amp;nbsp;I needed to use a flash component that consumed a web service on a project.&amp;nbsp; I had no control over the flash as it was written by a 3rd party.&amp;nbsp; Anyway the problem was the application was hosted&amp;nbsp;on a load balanced configuration and when the flash would pull the WSDL definition (within the same application no less) an internal port number was appended to the service location( &lt;a href="http://www.sitedomain.com/app/service.asmx:xxxx"&gt;http://www.sitedomain.com:xxxx/app/service.asmx&lt;/a&gt;).&amp;nbsp;&amp;nbsp; The problem was the client flash could not access that url, so what I ended up doing was overriding the wsdl generation and manually stripping out the port number.&amp;nbsp; The following code needs to be built into the web service application.&lt;font color="#0000ff" size="2"&gt; Imports&lt;/font&gt;&lt;font size="2"&gt; System&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Imports&lt;/font&gt;&lt;font size="2"&gt; System.Web.Services.Description&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Class&lt;/font&gt;&lt;font size="2"&gt; WSDLCustomGenerator &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Inherits&lt;/font&gt;&lt;font size="2"&gt; SoapExtensionReflector&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Overrides&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; ReflectMethod()&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/font&gt;&lt;font size="2"&gt; description &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; ServiceDescription = ReflectionContext.ServiceDescription&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; serv &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.Web.Services.Description.Service&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Each&lt;/font&gt;&lt;font size="2"&gt; serv &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;In&lt;/font&gt;&lt;font size="2"&gt; description.Services&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; pt &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; Port&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;For&lt;/font&gt; &lt;font color="#0000ff"&gt;Each&lt;/font&gt; pt &lt;font color="#0000ff"&gt;In&lt;/font&gt; serv.Ports&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/font&gt; ext &lt;font color="#0000ff"&gt;As&lt;/font&gt; ServiceDescriptionFormatExtension&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;For&lt;/font&gt; &lt;font color="#0000ff"&gt;Each&lt;/font&gt; ext &lt;font color="#0000ff"&gt;In&lt;/font&gt; pt.Extensions&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;Dim&lt;/font&gt; binding &lt;font color="#0000ff"&gt;As&lt;/font&gt; SoapAddressBinding&lt;/font&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;binding = &lt;font color="#0000ff"&gt;CType&lt;/font&gt;(ext, SoapAddressBinding)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;If&lt;/font&gt; &lt;font color="#0000ff"&gt;Not&lt;/font&gt; binding &lt;font color="#0000ff"&gt;Is&lt;/font&gt; &lt;font color="#0000ff"&gt;Nothing&lt;/font&gt; &lt;font color="#0000ff"&gt;Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#008000"&gt;&amp;#39;Nice hacky way of testing for the :xxxx port&amp;nbsp;after the url I&amp;#39;m assuming is 10 characters long, and shouldn&amp;#39;t have a&amp;nbsp;port number ever&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;If&lt;/font&gt; binding.Location.IndexOf(&amp;quot;:&amp;quot;, 10) &amp;gt; 0 &lt;font color="#0000ff"&gt;Then&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&lt;font color="#008000"&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;Replace port number&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; binding.Location = binding.Location.Remove(binding.Location.IndexOf(&amp;quot;:&amp;quot;, 10), 5)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/font&gt; &lt;font color="#0000ff"&gt;If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;End&lt;/font&gt; &lt;font color="#0000ff"&gt;If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;font size="2"&gt;Next&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;font size="2"&gt;Next&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;font size="2"&gt;Next&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;End&lt;/font&gt; &lt;font color="#0000ff"&gt;Sub&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;End&lt;/font&gt; &lt;font color="#0000ff"&gt;Class&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.inetium.com/aggbug.aspx?PostID=17057" width="1" height="1"&gt;</description><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/vb.net/default.aspx">vb.net</category><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/Web+Services/default.aspx">Web Services</category></item><item><title>Sorting Collections</title><link>http://blogs.inetium.com/blogs/prausch/archive/2008/04/02/sorting-collections.aspx</link><pubDate>Wed, 02 Apr 2008 15:17:00 GMT</pubDate><guid isPermaLink="false">7346ef18-9fb1-4a4e-be41-9add5078176c:17033</guid><dc:creator>prausch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.inetium.com/blogs/prausch/rsscomments.aspx?PostID=17033</wfw:commentRss><comments>http://blogs.inetium.com/blogs/prausch/archive/2008/04/02/sorting-collections.aspx#comments</comments><description>&lt;p&gt;With the new language features in the .Net framework this has become much simpler.&amp;nbsp; I had to implement sorting on a custom collection in two projects last week, one being .net 1.1 and one being .net 3.5.&amp;nbsp; Let me tell you it was much easier in 3.5 and much more flexible as you can order by multiple fields without doing multiple IComparers.&lt;/p&gt;
&lt;p&gt;In .net 1.1 I had to implement a custom IComparer class to do the comparison, which involves creating a whole new class and adding logic to do the sorting.&lt;/p&gt;
&lt;p&gt;In .net 3.5 all I had to do was this:&lt;/p&gt;
&lt;p&gt;myCollection = myCollection.OrderBy(obj =&amp;gt; obj.FieldToSort).ToList()&lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;myCollection&amp;nbsp; = (from obj in myCollection orderby obj.FieldOne, obj.FieldTwo select obj).ToList()&lt;font face="Arial" color="#000000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.inetium.com/aggbug.aspx?PostID=17033" width="1" height="1"&gt;</description><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/.Net+Development/default.aspx">.Net Development</category><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Disabling a CRM User service error</title><link>http://blogs.inetium.com/blogs/prausch/archive/2008/04/02/disabling-a-crm-user-service-error.aspx</link><pubDate>Wed, 02 Apr 2008 15:11:00 GMT</pubDate><guid isPermaLink="false">7346ef18-9fb1-4a4e-be41-9add5078176c:17032</guid><dc:creator>prausch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.inetium.com/blogs/prausch/rsscomments.aspx?PostID=17032</wfw:commentRss><comments>http://blogs.inetium.com/blogs/prausch/archive/2008/04/02/disabling-a-crm-user-service-error.aspx#comments</comments><description>&lt;p&gt;I recently had a problem where a user account on our test CRM installation was disabled without my knowledge.&amp;nbsp; The problem is I started getting authentication errors updating any records through CRM web services that had that user as the owner.&amp;nbsp; I could logon to CRM itself with the same credentials being used to call the web services and update record with that same disabled user as the owner, it would only cause problems udpating through the web services.&amp;nbsp; The error messages was just the generic authentication error which didn&amp;#39;t help much.&amp;nbsp; So moral of the story is if you disable a user account change ownership to an active user on CRM entities.&lt;/p&gt;
&lt;p&gt;PS - What I had to do to figure it out since I didn&amp;#39;t know that user had been disabled is take a record that worked and one that didn&amp;#39;t and go field by field in the database to figure out what was different.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.inetium.com/aggbug.aspx?PostID=17032" width="1" height="1"&gt;</description><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/CRM/default.aspx">CRM</category></item><item><title>Close an Opportunity in CRM 3.0 via web services</title><link>http://blogs.inetium.com/blogs/prausch/archive/2008/04/02/close-an-opportunity-in-crm-3-0-via-web-services.aspx</link><pubDate>Wed, 02 Apr 2008 15:02:00 GMT</pubDate><guid isPermaLink="false">7346ef18-9fb1-4a4e-be41-9add5078176c:17031</guid><dc:creator>prausch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.inetium.com/blogs/prausch/rsscomments.aspx?PostID=17031</wfw:commentRss><comments>http://blogs.inetium.com/blogs/prausch/archive/2008/04/02/close-an-opportunity-in-crm-3-0-via-web-services.aspx#comments</comments><description>&lt;p&gt;It took me a little time to figure out how set the state/status of a Opportunity to a win.&amp;nbsp; Other times I&amp;#39;ve had to set states/status on a CRM object I&amp;#39;ve only had to use the corresponding &lt;font size="2"&gt;SetStateRequest object which does exist for Opportunity but fails to do what I needed.&amp;nbsp; The following code shows how to close an Opportunity.&amp;nbsp; I&amp;nbsp;apologize its in VB.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;CRMService is the web reference to the CRM service URL.&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; oppClose &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; CRMService.opportunity&lt;/font&gt;&lt;font size="2"&gt;close = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;font size="2"&gt; CRMService.opportunityclose&lt;br /&gt;oppClose.opportunityid = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;font size="2"&gt; CRMService.Lookup&lt;br /&gt;oppClose.opportunityid.type = CRMService.EntityName.opportunity.ToString()&lt;br /&gt;oppClose.opportunityid.Value = opportunity.opportunityid.Value&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&amp;#39;Set fields related to the win&lt;br /&gt;oppClose.actualrevenue = CrmTypes.CreateCrmMoney(0)&lt;br /&gt;oppClose.actualend = CrmTypes.CreateCrmDateTime(DateTime.Today.ToShortDateString())&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; woReq &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; CRMService.WinOpportunityRequest = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;font size="2"&gt; CRMService.WinOpportunityRequest&lt;br /&gt;woReq.OpportunityClose = oppClose&lt;br /&gt;woReq.Status = 3&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; service &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; CRMService.CrmService = CrmServiceManager.GetService() &amp;#39;Custom service reference factory&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; woResp &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; CRMService.WinOpportunityResponse = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;CType&lt;/font&gt;&lt;font size="2"&gt;(service.Execute(close), CRMService.WinOpportunityResponse)&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.inetium.com/aggbug.aspx?PostID=17031" width="1" height="1"&gt;</description><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/.Net+Development/default.aspx">.Net Development</category><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/CRM/default.aspx">CRM</category></item><item><title>Rich Text Editing Made Easy</title><link>http://blogs.inetium.com/blogs/prausch/archive/2008/04/02/rich-text-editing-made-easy.aspx</link><pubDate>Wed, 02 Apr 2008 14:43:00 GMT</pubDate><guid isPermaLink="false">7346ef18-9fb1-4a4e-be41-9add5078176c:17030</guid><dc:creator>prausch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.inetium.com/blogs/prausch/rsscomments.aspx?PostID=17030</wfw:commentRss><comments>http://blogs.inetium.com/blogs/prausch/archive/2008/04/02/rich-text-editing-made-easy.aspx#comments</comments><description>&lt;p&gt;I came across a new rich text editor in a project recently where I just needed some simple lists/bolding/color capabilities.&amp;nbsp; Its super easy to use, you just reference the .dll and add it like any other server control to your page.&amp;nbsp; The nice part is everything is compiled into the .dll, you don&amp;#39;t have to add images or scripts to your project to support actions or tool bars.&amp;nbsp; I didn&amp;#39;t get into the adding of images or the more complex stuff though.&amp;nbsp; You can also specify the tool bar look and feel from a few different office type looks.&amp;nbsp; Oh, and its cheap!&lt;/p&gt;
&lt;p&gt;Anyway, here is the link.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://freetextbox.com/default.aspx"&gt;http://freetextbox.com/default.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.inetium.com/aggbug.aspx?PostID=17030" width="1" height="1"&gt;</description><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/.Net+Development/default.aspx">.Net Development</category></item><item><title>FetchXML Rocks!!</title><link>http://blogs.inetium.com/blogs/prausch/archive/2008/01/14/fetchxml-rocks.aspx</link><pubDate>Mon, 14 Jan 2008 21:19:00 GMT</pubDate><guid isPermaLink="false">7346ef18-9fb1-4a4e-be41-9add5078176c:12477</guid><dc:creator>prausch</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.inetium.com/blogs/prausch/rsscomments.aspx?PostID=12477</wfw:commentRss><comments>http://blogs.inetium.com/blogs/prausch/archive/2008/01/14/fetchxml-rocks.aspx#comments</comments><description>&lt;P&gt;Just kidding.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For anyone who had the pleasure of coding against the Microsoft CRM 1.0 web services you probably remember that cumbersome FetchXML you had to write to query against the CRM object model.&amp;nbsp; Well with CRM 3.0 and the strongly typed object model it exposes I thought I was in the clear from writing anymore of that crazy stuff until the other day.&amp;nbsp; I basically needed to&amp;nbsp;create a join and retrieve fields from two related CRM objects, after some research trying to use the typed object model I fame to realize Mr. FetchXML was back in town.&amp;nbsp; After an hour or so of searching trying to find the correct syntax to pass into the Fetch() method on the web service I came across this tool and 10 minutes later I was back in business.&amp;nbsp; Give it a look, its pretty sweet, you just point it to your CRM server and it will pull in all the meta data then its just a matter of selecting the entities and fields you want.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.jamesdowney.net/fetchxml.aspx"&gt;http://www.jamesdowney.net/fetchxml.aspx&lt;/A&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.inetium.com/aggbug.aspx?PostID=12477" width="1" height="1"&gt;</description><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.inetium.com/blogs/prausch/archive/tags/.Net+Development/default.aspx">.Net Development</category></item></channel></rss>