<?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"
	>

<channel>
	<title>MSCRMBLOG.NET - Microsoft CRM &#38; Sharepoint  Blog</title>
	<atom:link href="http://mscrmblog.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://mscrmblog.net</link>
	<description>Latest news, information and help on Microsoft Dynamics CRM, Microsoft Sharepoint Server (&#38; WSS), Server 2003/2008 and VMWare.</description>
	<pubDate>Tue, 13 Jul 2010 22:11:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Exchange 2003 Tips</title>
		<link>http://mscrmblog.net/2010/07/13/exchange-2003-tips/</link>
		<comments>http://mscrmblog.net/2010/07/13/exchange-2003-tips/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 22:10:58 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[Exchange 2003]]></category>

		<category><![CDATA[exchange 2003 tips and tricks]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=190</guid>
		<description><![CDATA[Prequisite for  installation of Exchange Server:
IIS, SMTP, WWW service ,NNTP, W3SVC
NET Framework
ASP.NET
Then run Forestprep.exe
The run domainprep.exe
Standard port numbers for SMTP, POP3, IMAP4, RPC, LDAP and Global Catalog: 
25	SMTP
110 	POP3
143	IMAP4
135	RPC
389	LDAP
636  LDAP (SSL)
3268  Global Catalog
465  SMTP/SSL
993	IMAP4/SSL
563  IMAP4/SSL
53   DNS
80   HTTP
88   Kerberos
102   X.400
110 POP3
119 	NNTP
137 - [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Prequisite for  installation of Exchange Server:</strong></p>
<p>IIS, SMTP, WWW service ,NNTP, W3SVC<br />
NET Framework<br />
ASP.NET<br />
Then run Forestprep.exe<br />
The run domainprep.exe</p>
<p><strong>Standard port numbers for SMTP, POP3, IMAP4, RPC, LDAP and Global Catalog:</strong> </p>
<p>25	SMTP<br />
110 	POP3<br />
143	IMAP4<br />
135	RPC<br />
389	LDAP<br />
636  LDAP (SSL)<br />
3268  Global Catalog<br />
465  SMTP/SSL<br />
993	IMAP4/SSL<br />
563  IMAP4/SSL<br />
53   DNS<br />
80   HTTP<br />
88   Kerberos<br />
102   X.400<br />
110 POP3<br />
119 	NNTP<br />
137 - NetBIOS Session Service<br />
139 - NetBIOS Name Service<br />
379 	LDAP (SRS)<br />
443	HTTP (SSL)<br />
445 -  NetBIOS over TCP<br />
563 	NNTP (SSL)<br />
691	 LSA<br />
993	 IMAP4 (SSL)<br />
994	 IRC (SSL)<br />
995	 POP3 (SSL)<br />
1503    T.120<br />
1720    H.323<br />
1731  Audio conferencing<br />
1863 - MSN IM<br />
3268 GC<br />
3269 GC (SSL)<br />
6001 Rpc/HTTP Exchange Store<br />
6002 HTTP Exchange Directory Referral service<br />
6004 Rpc/HTTP NSPI Exchange Directory Proxy service/Global Catalog</p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/07/13/exchange-2003-tips/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery 1.4.2 Visual Cheet Sheet</title>
		<link>http://mscrmblog.net/2010/07/13/jquery-142-visual-cheet-sheet/</link>
		<comments>http://mscrmblog.net/2010/07/13/jquery-142-visual-cheet-sheet/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 22:05:26 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[Web Dev]]></category>

		<category><![CDATA[jquery cheet sheet]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=186</guid>
		<description><![CDATA[jQuery cheet sheet for those web developers: jquery-visual-cheat-sheet-1-4-2.pdf
]]></description>
			<content:encoded><![CDATA[<p>jQuery cheet sheet for those web developers: <a href='http://mscrmblog.net/wp-content/uploads/2010/07/jquery-visual-cheat-sheet-1-4-2.pdf'>jquery-visual-cheat-sheet-1-4-2.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/07/13/jquery-142-visual-cheet-sheet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setup failed to determine whether a supported version of Microsoft Outlook is installed - Outlook 2010</title>
		<link>http://mscrmblog.net/2010/07/13/setup-failed-to-determine-whether-a-supported-version-of-microsoft-outlook-is-installed-outlook-2010/</link>
		<comments>http://mscrmblog.net/2010/07/13/setup-failed-to-determine-whether-a-supported-version-of-microsoft-outlook-is-installed-outlook-2010/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 21:57:59 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[CRM 4.0]]></category>

		<category><![CDATA[CRM 4.0 Client]]></category>

		<category><![CDATA[crm 4 client "outlook 2010" "unsupported" "windows 7" u]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=179</guid>
		<description><![CDATA[I recently tried to install the CRM client with my install of office 2010 (on Windows 7) and got an error and couldn&#8217;t continue.
&#8220;Setup failed to determine whether a supported version of Microsoft Outlook is installed&#8221;

The Fix:
Right click the install window on the taskbar and click &#8220;Close Window&#8221; - It will give you a choice [...]]]></description>
			<content:encoded><![CDATA[<p>I recently tried to install the CRM client with my install of office 2010 (on Windows 7) and got an error and couldn&#8217;t continue.</p>
<p>&#8220;Setup failed to determine whether a supported version of Microsoft Outlook is installed&#8221;</p>
<p><a href="http://mscrmblog.net/wp-content/uploads/2010/07/cant-install-crm4-client-outlook-2010.png"><img src="http://mscrmblog.net/wp-content/uploads/2010/07/cant-install-crm4-client-outlook-2010.png" alt="" title="cant-install-crm4-client-outlook-2010" width="300" height="228" class="alignnone size-medium wp-image-177" /></a></p>
<p><strong><em>The Fix:</em></strong></p>
<p><strong>Right click the install window on the taskbar and click &#8220;Close Window&#8221; - It will give you a choice &#8220;Do you really want to cancel the setup&#8221; then click &#8220;Yes&#8221;</strong></p>
<p><a href="http://mscrmblog.net/wp-content/uploads/2010/07/click-yes.png"><img src="http://mscrmblog.net/wp-content/uploads/2010/07/click-yes.png" alt="" title="click-yes-close-setup-Crm-client-4-install" width="300" height="227" class="alignnone size-medium wp-image-180" /></a></p>
<p><strong>It should begin installing:</strong></p>
<p><a href="http://mscrmblog.net/wp-content/uploads/2010/07/begin-installing.png"><img src="http://mscrmblog.net/wp-content/uploads/2010/07/begin-installing.png" alt="" title="begin-installing" width="300" height="227" class="alignnone size-medium wp-image-181" /></a></p>
<p><strong>It should complete, now open outlook and configure CRM for outlook (CRM URL, Organisation etc..)</strong></p>
<p><a href="http://mscrmblog.net/wp-content/uploads/2010/07/complete.png"><img src="http://mscrmblog.net/wp-content/uploads/2010/07/complete.png" alt="" title="complete" width="300" height="228" class="alignnone size-medium wp-image-183" /></a></p>
<p><strong>Install Client Update Rollup 7 and 11 or else the CRM toolbar will be in a new &#8220;Tab&#8221; in Outlook 2010 called &#8220;Addins&#8221;:</strong></p>
<p><a href="http://mscrmblog.net/wp-content/uploads/2010/07/crm-4-on-addins-toolbar.png"><img src="http://mscrmblog.net/wp-content/uploads/2010/07/crm-4-on-addins-toolbar.png" alt="" title="crm-4-on-addins-toolbar" width="300" height="22" class="alignnone size-medium wp-image-182" /></a></p>
<p><strong>It should turn out like this:</strong></p>
<p><a href="http://mscrmblog.net/wp-content/uploads/2010/07/crm-4-on-main-toolbar.png"><img src="http://mscrmblog.net/wp-content/uploads/2010/07/crm-4-on-main-toolbar.png" alt="" title="crm-4-on-main-toolbar" width="300" height="60" class="alignnone size-medium wp-image-184" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/07/13/setup-failed-to-determine-whether-a-supported-version-of-microsoft-outlook-is-installed-outlook-2010/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CRM 4: IFD Authentication using C#</title>
		<link>http://mscrmblog.net/2010/04/14/crm-4-ifd-authentication-using-csharp/</link>
		<comments>http://mscrmblog.net/2010/04/14/crm-4-ifd-authentication-using-csharp/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 02:00:38 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[CRM 4.0]]></category>

		<category><![CDATA[Plug-ins]]></category>

		<category><![CDATA[authenticate]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[crmservice]]></category>

		<category><![CDATA[IFD]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=172</guid>
		<description><![CDATA[A  very common question is: &#8220;How do i run a plugin/custom web application against a IFD deployment?&#8221;
You should use the below code:

CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://YOUR.IFD.URL/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";
RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();
orgRequest.UserId = @"username";
orgRequest.Password = "password";
RetrieveOrganizationsResponse orgResponse = (RetrieveOrganizationsResponse)disco.Execute(orgRequest);
OrganizationDetail orgInfo = null;
foreach (OrganizationDetail orgdetail in orgResponse.OrganizationDetails)
{
   if (orgdetail.OrganizationName.Equals("OrgName"))
   {
  [...]]]></description>
			<content:encoded><![CDATA[<p>A  very common question is: &#8220;How do i run a plugin/custom web application against a IFD deployment?&#8221;</p>
<p>You should use the below code:</p>
<pre>
<code>CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://YOUR.IFD.URL/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";
RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();
orgRequest.UserId = @"username";
orgRequest.Password = "password";
RetrieveOrganizationsResponse orgResponse = (RetrieveOrganizationsResponse)disco.Execute(orgRequest);
OrganizationDetail orgInfo = null;
foreach (OrganizationDetail orgdetail in orgResponse.OrganizationDetails)
{
   if (orgdetail.OrganizationName.Equals("OrgName"))
   {
   orgInfo = orgdetail;
   break;
   }
}
if (orgInfo == null)
{
   throw new Exception("The specified organization was not found.");
}
RetrieveCrmTicketRequest ticketRequest = new RetrieveCrmTicketRequest();
ticketRequest.OrganizationName = orgInfo.OrganizationName;
ticketRequest.UserId = @"username";
ticketRequest.Password = "password";
RetrieveCrmTicketResponse ticketResponse = (RetrieveCrmTicketResponse)disco.Execute(ticketRequest);

CrmAuthenticationToken sdktoken = new CrmAuthenticationToken();
sdktoken.AuthenticationType = 2;
sdktoken.OrganizationName = orgInfo.OrganizationName;
sdktoken.CrmTicket = ticketResponse.CrmTicket;
CrmService service = new CrmService();
service.CrmAuthenticationTokenValue = sdktoken;
service.Url = orgInfo.CrmServiceUrl;</code>
</pre>
<p>Code: <a href='http://mscrmblog.net/wp-content/uploads/2010/04/ifd-service-auth-code.txt'>ifd-service-auth-code.txt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/04/14/crm-4-ifd-authentication-using-csharp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Backup and restore your SharePoint website using SharePoint Designer</title>
		<link>http://mscrmblog.net/2010/04/14/backup-and-restore-your-sharepoint-website-using-sharepoint-designer/</link>
		<comments>http://mscrmblog.net/2010/04/14/backup-and-restore-your-sharepoint-website-using-sharepoint-designer/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 01:43:47 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[Sharepoint]]></category>

		<category><![CDATA[backup]]></category>

		<category><![CDATA[pdf]]></category>

		<category><![CDATA[restore sharepoint]]></category>

		<category><![CDATA[sharepoint designer]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=169</guid>
		<description><![CDATA[Found this PDF on how to backup and restore your SharePoint (SPWeb) website using SharePoint Designer: backup-restore-share-point-2007.pdf
Kudos to the Creator of the PDF.
]]></description>
			<content:encoded><![CDATA[<p>Found this PDF on how to backup and restore your SharePoint (SPWeb) website using SharePoint Designer: <a href='http://mscrmblog.net/wp-content/uploads/2010/04/backup-restore-share-point-2007.pdf'>backup-restore-share-point-2007.pdf</a></p>
<p>Kudos to the Creator of the PDF.</p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/04/14/backup-and-restore-your-sharepoint-website-using-sharepoint-designer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SP - Uploading files to SharePoint document library</title>
		<link>http://mscrmblog.net/2010/03/09/sp-uploading-files-to-sharepoint-document-library/</link>
		<comments>http://mscrmblog.net/2010/03/09/sp-uploading-files-to-sharepoint-document-library/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 12:51:07 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[Sharepoint]]></category>

		<category><![CDATA[document library upload]]></category>

		<category><![CDATA[sharepoint upload]]></category>

		<category><![CDATA[wss]]></category>

		<category><![CDATA[wss upload]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=166</guid>
		<description><![CDATA[here we go, just some simple upload code that uploads documents into a document library. 
It also checks if the same file exist in the destination library before upload.

SPSite site = new SPSite("http://mysharepointsite");
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // i always add this in to prevent security errors
Stream fStream = postedFile.InputStream;
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, [...]]]></description>
			<content:encoded><![CDATA[<p>here we go, just some simple upload code that uploads documents into a document library. </p>
<p>It also checks if the same file exist in the destination library before upload.</p>
<pre>
<code>SPSite site = new SPSite("http://mysharepointsite");
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // i always add this in to prevent security errors
Stream fStream = postedFile.InputStream;
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
string newFilename = System.IO.Path.GetFileName(postedFile.FileName);
SPFile fileExist = web.GetFile(destFolder + "/" + newFilename);

if (fileExist.Exists)
{
    Response.Write("&lt;font color='red'&gt;<b>Error: A file exist with the same filename. Please Rename this File.</b>&lt;/font&gt;&lt;br /&gt;");
}
else
{
   web.GetFolder(destFolder).Files.Add(newFilename, contents);
   completed.Text = "&lt;br /&gt;&lt;font color='green'&gt;<b>Successfully uploaded '" + filename + "' to: " + destFolder + " &lt;/font&gt;</b>&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;";
}</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/03/09/sp-uploading-files-to-sharepoint-document-library/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CRM 4 - Update Rollup 9</title>
		<link>http://mscrmblog.net/2010/03/09/crm-4-update-rollup-9/</link>
		<comments>http://mscrmblog.net/2010/03/09/crm-4-update-rollup-9/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 12:37:50 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[CRM 4.0]]></category>

		<category><![CDATA[changes]]></category>

		<category><![CDATA[crm]]></category>

		<category><![CDATA[crm4]]></category>

		<category><![CDATA[packs]]></category>

		<category><![CDATA[update rollup]]></category>

		<category><![CDATA[update rollup 9]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=164</guid>
		<description><![CDATA[Well, update roll up 9 is out (how the hell did we get to 9??)! Jeez with all these update packs there needs to be a full job to implement all these updates on servers and implement the necessary changes the update pack doesn&#8217;t.
KB article: http://support.microsoft.com/default.aspx?kbid=977650
Download: http://www.microsoft.com/downloads/details.aspx?displaylang=en&#038;FamilyID=5869f2b3-d1a0-4f71-8be3-fde6e8053a2e
]]></description>
			<content:encoded><![CDATA[<p>Well, update roll up 9 is out (how the hell did we get to 9??)! Jeez with all these update packs there needs to be a full job to implement all these updates on servers and implement the necessary changes the update pack doesn&#8217;t.</p>
<p>KB article: <a href="http://support.microsoft.com/default.aspx?kbid=977650">http://support.microsoft.com/default.aspx?kbid=977650</a></p>
<p>Download: <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&#038;FamilyID=5869f2b3-d1a0-4f71-8be3-fde6e8053a2e">http://www.microsoft.com/downloads/details.aspx?displaylang=en&#038;FamilyID=5869f2b3-d1a0-4f71-8be3-fde6e8053a2e</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/03/09/crm-4-update-rollup-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mini Preview Window for Contact Lookup Field</title>
		<link>http://mscrmblog.net/2010/03/09/mini-preview-window-for-contact-lookup-field/</link>
		<comments>http://mscrmblog.net/2010/03/09/mini-preview-window-for-contact-lookup-field/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 12:29:52 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[CRM 4.0]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[crm]]></category>

		<category><![CDATA[crm4]]></category>

		<category><![CDATA[field]]></category>

		<category><![CDATA[preview]]></category>

		<category><![CDATA[preview window]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=156</guid>
		<description><![CDATA[
Looks cool doesn&#8217;t it. well here goes nothing..
to achieve the above you will need the following (click read more link..)

// the following code is for the hover over lookup window

function OnCrmPageLoad()
{
 /*
  Reference the to Lookup, Provide the lookup (control) id.
 */
  var PrvToLui = new LookupPreview("new_primarycontactid");
 /*
  Add Account Preview Information [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mscrmblog.net/downloads/preview_field_opportunity.png"><img src="http://mscrmblog.net/downloads/preview_field_opportunity.png" width="600px" alt="Preview Field" /></a></p>
<p>Looks cool doesn&#8217;t it. well here goes nothing..</p>
<p>to achieve the above you will need the following (click read more link..)</p>
<pre>
<code>// the following code is for the hover over lookup window

function OnCrmPageLoad()
{
 /*
  Reference the to Lookup, Provide the lookup (control) id.
 */
  var PrvToLui = new LookupPreview("new_primarycontactid");
 /*
  Add Account Preview Information ,
  returns an account entity wrapper object
 */
 var accountEntity = PrvToLui.AddEntity("account");

 /*
  Add Account Preview Attributes,
  Provide lable and schema name for each attribute
 */
  accountEntity.AddAttribute("Business Phone","address1_line1");
  accountEntity.AddAttribute("Mobile Phone","address1_city");
  accountEntity.AddAttribute("Fax","address1_stateorprovince");
  accountEntity.AddAttribute("E-mail","address1_postalcode");
 /*
  Add Related Entity (Primary Contact) Information
  AddLinked requires the entity name and
  lookup field schema name on the account.
 */
 var contactEntity = accountEntity.AddLinked("contact","primarycontactid");
  contactEntity.AddAttribute("Primary Contact","fullname");
  contactEntity.AddAttribute("Contact Phone","telephone1");

 /* ------------------------------------------------------------------ */

 //Contact Entity Preview
 var contactEntity = PrvToLui.AddEntity("contact");
  contactEntity.AddAttribute("Business Phone","telephone1");
  contactEntity.AddAttribute("Mobile Phone","mobilephone");
  contactEntity.AddAttribute("Fax","fax");
  contactEntity.AddAttribute("E-mail","emailaddress1");

 var accountEntity = contactEntity.AddLinked("account","parentcustomerid");
   accountEntity.AddAttribute("Parent Company", "name");
   accountEntity.AddAttribute("Parent Street","address1_line1");
   accountEntity.AddAttribute("Parent Suburb","address1_line2");
   accountEntity.AddAttribute("Parent State","address1_stateorprovince");
   accountEntity.AddAttribute("Parent Postcode","address1_postalcode");
   accountEntity.AddAttribute("Parent Website","websiteurl");
 /* ------------------------------------------------------------------ */

}
<span id="more-156"></span>
function LookupPreview( lookupId )
{
   var Instance = this;
  Instance.Lookup = document.getElementById( lookupId );

   if(  isNullOrEmpty(Instance.Lookup) )
  return;

   //Public
   Instance.Entities = [];

   Instance.AddEntity = function(entityName){
  var Entity = new Object();
   Entity.Name = entityName;
   Entity.AddAttribute = function( labelName , attrName ){
    var Attributes = Instance.Entities[entityName].Attributes;
    var attribute  = new Attribute(entityName , attrName , labelName , attrName);
     Attributes[Attributes.length] = attribute;
     DisplayAttributes[DisplayAttributes.length] = attribute;
      }
   Entity.Attributes  = [];
   Entity.LinkedByName  = [];
   Entity.LinkedByIndex = [];
   Entity.AddLinked = function( lnkEntityName , referencingAttribute )
   {
    var LinkEntity = new Object();
     LinkEntity.Name = lnkEntityName;
     LinkEntity.Attributes = [];
     LinkEntity.RefAttribute = referencingAttribute;
     LinkEntity.AddAttribute = function( labelName , attrName )
     {
      var attribute = new Attribute(entityName , attrName , labelName , LinkEntity.RefAttribute + "." + attrName);
       LinkEntity.Attributes[LinkEntity.Attributes.length] = attribute;
       DisplayAttributes[DisplayAttributes.length] = attribute;
     }
     Entity.LinkedByIndex[Entity.LinkedByIndex.length] = Entity.LinkedByName[name] = LinkEntity;
    return LinkEntity;
   }
   Instance.Entities[entityName] = Entity;
  return Entity;
   }

   Instance.Show = function(dataElement)
   {
  var control   = Instance.Lookup;
  var DataValue = control.DataValue;

  if( isNullOrEmpty(DataValue) )
   return;
  if( isNullOrEmpty(Instance.Entities[DataValue[dataElement.Index].typename]) )
   return;

  TooltipPopup = window.createPopup();            

  if( !dataElement.PreviewHTML )
  {
   var ToolTipHTML = "&lt;fieldset style='width:100%;height:100%;border:1px solid gray;background-color: #d8e8ff;filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#eff3ff,EndColorStr=#c6dfff);padding-left:2px;'&gt;&lt;legend style='background-color:#eff3ff;width:100;padding-left:13px;border:1px solid gray;font-size:12px;font-family:tahoma'&gt;<b>Preview</b>&lt;/legend&gt;";
   var xmlHttp = CreateXmlHttp();
   var xml = "&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"";
    xml += " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"";
    xml += " xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;";
    xml += GenerateAuthenticationHeader();
    xml += "&lt;soap:Body&gt;";
    xml += "&lt;Fetch xmlns="http://schemas.microsoft.com/crm/2007/WebServices"&gt;";
    xml += "&lt;fetchXml&gt;";

   var fetchxml = "&lt;fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'&gt;";
   var DataVal  = control.DataValue[dataElement.Index];
   var entity   = DataVal.typename;
    fetchxml += "&lt;entity name='" + entity + "'&gt;";
   var attributes = Instance.Entities[entity].Attributes;
    for( var i = 0 ; i &lt; attributes.length ; i++ )
      fetchxml += "&lt;attribute name='" + attributes[i].Name + "'/&gt;";
    fetchxml += "&lt;filter type='and'&gt;";
    fetchxml += "&lt;condition attribute='" + entity + "id' operator='eq' value='" + DataVal.id + "'/&gt;";
    fetchxml += "&lt;/filter&gt;";

    for( var i = 0 ; i &lt; Instance.Entities[entity].LinkedByIndex.length ; i++ )
    {
     var linked = Instance.Entities[entity].LinkedByIndex[i];
     fetchxml += "&lt;link-entity name='" + linked.Name + "' from='" + linked.Name + "id' to='" + linked.RefAttribute+ "' visible='false' link-type='outer'&gt;";
     for( var j = 0 ; j &lt; linked.Attributes.length ; j++ )
      fetchxml += "&lt;attribute name='" + linked.Attributes[j].Name + "'/&gt;";
     fetchxml += "&lt;/link-entity&gt;";
    }
    fetchxml += "&lt;/entity&gt;";
    fetchxml += "&lt;/fetch&gt;";

    xml += _HtmlEncode(fetchxml);
    xml += "&lt;/fetchXml&gt;";
    xml += "&lt;/Fetch&gt;";
    xml += "&lt;/soap:Body&gt;";
    xml += "&lt;/soap:Envelope&gt;";

    xmlHttp.open("POST", "/mscrmservices/2007/crmservice.asmx", false );
    xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xmlHttp.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Fetch");
    xmlHttp.send(xml);

   var resultDoc   = loadXmlDocument(xmlHttp.responseXML.text);
   var previewHtml = "&lt;br style='line-height:2px'/&gt;&lt;table width='100%' style='font:12 px tahoma'&gt;";
    dataElement.Width = 0;
    //debugger
    for( var i = 0 , j = 1; i &lt; DisplayAttributes.length ; i++ )
    {
     var attribute = DisplayAttributes[i];
     if( attribute.Entity != entity ) continue;

     var attrNode  = resultDoc.selectSingleNode("//" + attribute.XPathName );
     var attrValue = (attrNode)? attrNode.text:"";

      dataElement.Height = (j++) * 22;
      var maxLength  = ( attrValue.length + attribute.Label.length ) * 9;
      if( dataElement.Width &lt; maxLength )
       dataElement.Width = maxLength;
      previewHtml += "&lt;tr&gt;&lt;td style='padding:3px 0px 0px 0px;color:brown'&gt;&lt;nobr&gt;" + attribute.Label + "&lt;/nobr&gt;&lt;/td&gt;&lt;td&gt;&lt;nobr&gt;" + attrValue  + "&lt;/nobr&gt;&lt;/td&gt;&lt;/tr&gt;";

    }

    dataElement.Height += 20;

    ToolTipHTML += previewHtml;
    ToolTipHTML += "&lt;/table&gt;&lt;/fieldset&gt;";
    dataElement.PreviewHTML = ToolTipHTML;
   }

   TooltipPopup.document.body.innerHTML = dataElement.PreviewHTML;      

  var Position = getControlPostion();
  var Left   = Position.X + 1;
  var Top    = Position.Y + 5;

   TooltipPopup.show( Left , Top - dataElement.parentElement.scrollTop , dataElement.Width, dataElement.Height , null );
   }

   Instance.Hide = function()
   {
  if( TooltipPopup )
   TooltipPopup.hide();
   }

   Instance.OnLookupChange = function()
   {
  var jump = 0;
  if( Instance.Lookup.DataValue != null )
     {
   var DataElementsLen = Instance.Lookup.parentElement.previousSibling.childNodes[0].childNodes.length;
   var DataValuesLen   = Instance.Lookup.DataValue.length;
    jump = (DataElementsLen == DataValuesLen)? 1:2;

     for( var i = 0 ; i &lt; DataValuesLen*jump ; i+=jump )
     {
    var DataValueElemet = Instance.Lookup.parentElement.previousSibling.childNodes[0].childNodes[i];
    if( !isNullOrEmpty(DataValueElemet.onmouseover) ) continue;

    DataValueElemet.Preview = Instance;
    DataValueElemet.Index = i/jump;
    DataValueElemet.onmouseover = function(){
     this.Preview.Show(this);
    }
    DataValueElemet.onmouseout = function(){
     this.Preview.Hide();
    }
     }
     }
   }

   //Private
   var TooltipPopup;
   var DisplayAttributes;

   function Init()
   {
  DisplayAttributes = [];
  Instance.Lookup.attachEvent( "onchange" , Instance.OnLookupChange );
  Instance.OnLookupChange();  //First Time
   }

   function Attribute(entityName,attrName,attrLabel,attrXpathName)
   {
  this.Name = attrName;
  this.Entity = entityName;
  this.Label = attrLabel;
  this.XPathName = attrXpathName;
   }

   function getControlPostion()
   {
  control = event.srcElement;
  var Position = new Object();
  var controlHeight = control.offsetHeight;
  var iY = 0, iX = 0;
  while( control != null )
  {
   iY += control.offsetTop;
   iX += control.offsetLeft;
   control = control.offsetParent;
  }
  Position.X = iX + screenLeft;
  Position.Y = iY + screenTop + controlHeight;
  return Position;
    }

 function isNullOrEmpty( obj ){
  return obj == null || typeof(obj) == "undefined" || obj == "";
 }

   Init();
}

OnCrmPageLoad();</code>
</pre>
<p>OK, this is what needs to be edited if you need custom attributes listed in the preview window.</p>
<p>you may edit the following code block:</p>
<pre>
<code>  contactEntity.AddAttribute("Business Phone","telephone1");
  contactEntity.AddAttribute("Mobile Phone","mobilephone");
  contactEntity.AddAttribute("Fax","fax");
  contactEntity.AddAttribute("E-mail","emailaddress1");</code>
</pre>
<p>&#8220;Business Phone&#8221; represents the label on the preview form<br />
&#8220;telephone1&#8243; is the attribute on the contact entity</p>
<p>I have uploaded a text file with all the code at: <a href="http://mscrmblog.net/downloads/previewWindow.txt">http://mscrmblog.net/downloads/previewWindow.txt</a></p>
<p>This code is pretty self explanatory.. however if you need some help, email me or post a comment <img src='http://mscrmblog.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/03/09/mini-preview-window-for-contact-lookup-field/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Update Filename or List Item name programmatically in SharePoint/WSS</title>
		<link>http://mscrmblog.net/2010/03/09/update-filename-or-list-item-name-programmatically-in-sharepoint-wss/</link>
		<comments>http://mscrmblog.net/2010/03/09/update-filename-or-list-item-name-programmatically-in-sharepoint-wss/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 12:16:38 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[Sharepoint]]></category>

		<category><![CDATA[move]]></category>

		<category><![CDATA[move sharepoint file]]></category>

		<category><![CDATA[moving items]]></category>

		<category><![CDATA[rename files]]></category>

		<category><![CDATA[renaming files]]></category>

		<category><![CDATA[sharepoint rename]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=152</guid>
		<description><![CDATA[As simple as it sounds, it ain&#8217;t simple.
you would of thought the following would work:

SPFile file = web.GetFile(strUrl);
file.name = "mynameFilename.txt";
file.Update();

does not compute.. 
There are 2 ways I&#8217;ve found of accomplishing this:
1. using the SPFile.MoveTo method:

string strUrl = "http://mysharepointsite/myolddocumentlibrary/Filename.txt";
string newFileUrl = "http://mysharepointsite/mynewdocumentlibrary/mynewFilename.txt";

SPSite site = new SPSite("http://mysharepointsite");
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // this will stop it [...]]]></description>
			<content:encoded><![CDATA[<p>As simple as it sounds, it ain&#8217;t simple.</p>
<p>you would of thought the following would work:</p>
<pre>
<code>SPFile file = web.GetFile(strUrl);
file.name = "mynameFilename.txt";
file.Update();</code>
</pre>
<p>does not compute.. </p>
<p>There are 2 ways I&#8217;ve found of accomplishing this:</p>
<p>1. using the SPFile.MoveTo method:</p>
<pre>
<code>string strUrl = "http://mysharepointsite/myolddocumentlibrary/Filename.txt";
string newFileUrl = "http://mysharepointsite/mynewdocumentlibrary/mynewFilename.txt";

SPSite site = new SPSite("http://mysharepointsite");
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // this will stop it from erroring out due to security errors
SPFile file = web.GetFile(strUrl);
file.MoveTo(newFileUrl);</code>
</pre>
<p>2. using File.Item["Name"] method..</p>
<pre>
<code>string strUrl = "http://mysharepointsite/myolddocumentlibrary/Filename.txt";

SPSite site = new SPSite("http://mysharepointsite");
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // this will stop it from erroring out due to security errors
SPFile file = web.GetFile(strUrl);
file.Item["Name"] = "NewFileName.txt";</code>
</pre>
<p>However i have found method 1 more reliable. hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2010/03/09/update-filename-or-list-item-name-programmatically-in-sharepoint-wss/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sharepoint 2010 Preview Sneakpeak</title>
		<link>http://mscrmblog.net/2009/08/12/sharepoint-2010-preview-sneakpeak/</link>
		<comments>http://mscrmblog.net/2009/08/12/sharepoint-2010-preview-sneakpeak/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 09:50:03 +0000</pubDate>
		<dc:creator>MSCRM-Admin</dc:creator>
		
		<category><![CDATA[CRM 4.0]]></category>

		<category><![CDATA[sharepoint 2010]]></category>

		<guid isPermaLink="false">http://mscrmblog.net/?p=146</guid>
		<description><![CDATA[view it at: http://sharepoint.microsoft.com/2010/sneak_peek/pages/default.aspx
]]></description>
			<content:encoded><![CDATA[<p>view it at: <a title="http://sharepoint.microsoft.com/2010/sneak_peek/pages/default.aspx" href="http://sharepoint.microsoft.com/2010/sneak_peek/pages/default.aspx" target="_blank">http://sharepoint.microsoft.com/2010/sneak_peek/pages/default.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mscrmblog.net/2009/08/12/sharepoint-2010-preview-sneakpeak/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
