<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Finding CRM Accounts that have been shared</title>
	<atom:link href="http://blogs.infinite-x.net/2006/12/04/finding-crm-accounts-that-have-been-shared/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.infinite-x.net/2006/12/04/finding-crm-accounts-that-have-been-shared/</link>
	<description>Knowledge found and lost while working with Microsoft CRM</description>
	<pubDate>Tue, 06 Jan 2009 23:21:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Mitch Milam&#8217;s Microsoft Discussions &#187; Blog Archive &#187; Finding Shared CRM Accounts, Part 2</title>
		<link>http://blogs.infinite-x.net/2006/12/04/finding-crm-accounts-that-have-been-shared/#comment-454</link>
		<dc:creator>Mitch Milam&#8217;s Microsoft Discussions &#187; Blog Archive &#187; Finding Shared CRM Accounts, Part 2</dc:creator>
		<pubDate>Thu, 07 Dec 2006 00:17:31 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2006/12/04/finding-crm-accounts-that-have-been-shared/#comment-454</guid>
		<description>[...] I just love the CRM community.&#160; Ayaz Ahmad of Ovex Technologies Pvt. Ltd.&#160;in Pakistan posted a comment on the previous article about finding Shared CRM Accounts and included a C# function written to perform a similar function to the SQL code in the other article.&#160; [...]</description>
		<content:encoded><![CDATA[<p>[...] I just love the CRM community.&nbsp; Ayaz Ahmad of Ovex Technologies Pvt. Ltd.&nbsp;in Pakistan posted a comment on the previous article about finding Shared CRM Accounts and included a C# function written to perform a similar function to the SQL code in the other article.&nbsp; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ayazahmad</title>
		<link>http://blogs.infinite-x.net/2006/12/04/finding-crm-accounts-that-have-been-shared/#comment-453</link>
		<dc:creator>ayazahmad</dc:creator>
		<pubDate>Tue, 05 Dec 2006 23:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2006/12/04/finding-crm-accounts-that-have-been-shared/#comment-453</guid>
		<description>Unfortunately the article is related to the old version MSCRM 1.2.
Now I was assigned the mammoth task of creating a report to display
all the shared accounts by a Team. I searched the technical articles
to get a starting point for the solution but in vain. All the
articles and code snippets consisted of Sql based solutions etc. So
finally I had to come up with my own intuition once again, ƒº and came
up with the following function that I would like to share with all
you developers of MSCRM 3.0. Love to get feedback on this and if some
one has alternate method, do let me know.


void ListSharedObjectByTeams(Guid TeamId)
{
try
{
CrmService service = new CrmService();
service.Credentials =
System.Net.CredentialCache.DefaultCredentials;

// Create the ColumnSet indicating
the fields to be retrieved
ColumnSet cols = new ColumnSet();

// Sets the ColumnSet's Properties
cols.Attributes = new string []
{"name", "accountid"};

// Create the QueryExpression Object
QueryExpression query = new
QueryExpression();

// Set the QueryExpression Object's
Properties
query.EntityName =
EntityName.account.ToString();
query.ColumnSet = cols;


// Retrieve the Contacts
BusinessEntityCollection bus =
service.RetrieveMultiple(query);
for (int i = 0;
i</description>
		<content:encoded><![CDATA[<p>Unfortunately the article is related to the old version MSCRM 1.2.<br />
Now I was assigned the mammoth task of creating a report to display<br />
all the shared accounts by a Team. I searched the technical articles<br />
to get a starting point for the solution but in vain. All the<br />
articles and code snippets consisted of Sql based solutions etc. So<br />
finally I had to come up with my own intuition once again, ƒº and came<br />
up with the following function that I would like to share with all<br />
you developers of MSCRM 3.0. Love to get feedback on this and if some<br />
one has alternate method, do let me know.</p>
<p>void ListSharedObjectByTeams(Guid TeamId)<br />
{<br />
try<br />
{<br />
CrmService service = new CrmService();<br />
service.Credentials =<br />
System.Net.CredentialCache.DefaultCredentials;</p>
<p>// Create the ColumnSet indicating<br />
the fields to be retrieved<br />
ColumnSet cols = new ColumnSet();</p>
<p>// Sets the ColumnSet&#039;s Properties<br />
cols.Attributes = new string []<br />
{&#034;name&#034;, &#034;accountid&#034;};</p>
<p>// Create the QueryExpression Object<br />
QueryExpression query = new<br />
QueryExpression();</p>
<p>// Set the QueryExpression Object&#039;s<br />
Properties<br />
query.EntityName =<br />
EntityName.account.ToString();<br />
query.ColumnSet = cols;</p>
<p>// Retrieve the Contacts<br />
BusinessEntityCollection bus =<br />
service.RetrieveMultiple(query);<br />
for (int i = 0;<br />
i</p>
]]></content:encoded>
	</item>
</channel>
</rss>
