<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-56949280590982116</id><updated>2011-10-29T17:11:06.024-07:00</updated><title type='text'>Chandan's CRM Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-2675867669245233060</id><published>2011-08-09T22:45:00.000-07:00</published><updated>2011-08-09T22:47:58.188-07:00</updated><title type='text'>Hide/Show the CRM modules based on roles</title><content type='html'>We have sale, marketing and service modules in the CRM. We want to show the sale module only to the sales user,  marketing module only to marketing users, service module to service users. &lt;br /&gt;&lt;br /&gt;Create a custom Entity named “link”. &lt;br /&gt;&lt;br /&gt;Edit the sitemap. &lt;br /&gt;In sales for all the SubArea add the Privilege only to “create” on the custom entity “link”.  &lt;br /&gt;&amp;lt;Privilege Entity="new_link" Privilege="Create" /&amp;gt;&lt;br /&gt;In Marketing for all the SubArea add the Privilege only to “Read” for the custom entity “link”.  &lt;br /&gt;&amp;lt;Privilege Entity="new_link" Privilege="Read" /&amp;gt;&lt;br /&gt;In Settings for all the SubArea add the Privilege only to “Write” for the custom entity “link”.  &lt;br /&gt;&amp;lt;Privilege Entity="new_link" Privilege="Write" /&amp;gt;&lt;br /&gt;&lt;br /&gt;Save and import the soluntion. &lt;br /&gt;&lt;br /&gt;In security roles give the Create Privilege on “link” to all sales roles, Read Privilege on “link” to all marketing roles, Write Privilege on “link” to all service roles.  &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-2675867669245233060?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/2675867669245233060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=2675867669245233060' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2675867669245233060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2675867669245233060'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2011/08/hideshow-crm-modules-based-on-roles.html' title='Hide/Show the CRM modules based on roles'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-5340913226444616045</id><published>2010-10-06T06:41:00.000-07:00</published><updated>2010-10-06T06:44:37.321-07:00</updated><title type='text'>Deploying Wizard Report to Different Server</title><content type='html'>When we create a wizard report in CRM, it’s really difficult to move the same report to production. Once you download the wizard report, we get an RDL file. &lt;br /&gt;&lt;br /&gt;When we upload this RDL file to production, we get a report but wizard is lost. User can’t update the report (like column, group etc).  &lt;br /&gt;&lt;br /&gt;I searched into the database and found a solution (its unsupported) to enable the wizard of the wizard report after uploading the RDL. &lt;br /&gt;&lt;br /&gt;Steps to upload a wizard report to production:&lt;br /&gt;&lt;br /&gt;Create a wizard report in CRM in Dev environment.&lt;br /&gt;Download  the wizard report, it will give an RDL file.&lt;br /&gt;Upload the same RDL file to the Production as “Existing file”.&lt;br /&gt;Login to ORG_MSCRM DB, update the Report table entry, set IsCustomReport = 1 for the corresponding report.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-5340913226444616045?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/5340913226444616045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=5340913226444616045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5340913226444616045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5340913226444616045'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/10/deploying-wizard-report-to-different.html' title='Deploying Wizard Report to Different Server'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-8785794547882073484</id><published>2010-06-28T02:42:00.000-07:00</published><updated>2010-06-28T02:46:10.137-07:00</updated><title type='text'>CRM update web service call in Java Script</title><content type='html'>// Record Owner &lt;br /&gt;var Owner = new Array;&lt;br /&gt;Owner = crmForm.all.ownerid.DataValue;&lt;br /&gt;var oppOwner = Owner[0].name;&lt;br /&gt;&lt;br /&gt;// updating Opportunity&lt;br /&gt;/* setting opportunuty owner name to a text field in the same record using crm update web service call in JScript */&lt;br /&gt;try &lt;br /&gt;{&lt;br /&gt;var xml1 = "&amp;lt;?xml version='1.0' encoding='utf-8'?&amp;gt;"+&lt;br /&gt; "&amp;lt;soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'"+&lt;br /&gt; " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+&lt;br /&gt; " xmlns:xsd='http://www.w3.org/2001/XMLSchema'&amp;gt;"+&lt;br /&gt; GenerateAuthenticationHeader()+&lt;br /&gt; "&amp;lt;soap:Body&amp;gt;"+&lt;br /&gt; "&amp;lt;Update xmlns='http://schemas.microsoft.com/crm/2007/WebServices'&amp;gt;"+&lt;br /&gt; "&amp;lt;entity xsi:type='opportunity'&amp;gt;" +&lt;br /&gt; "&amp;lt;new_text&amp;gt;"+ xmlencode(oppOwner) +"&amp;lt;/new_text&amp;gt;" +&lt;br /&gt; "&amp;lt;opportunityid&amp;gt;" + crmForm.ObjectId + "&amp;lt;/opportunityid&amp;gt;" +&lt;br /&gt; "&amp;lt;/entity&amp;gt;"+&lt;br /&gt; "&amp;lt;/Update&amp;gt;"+&lt;br /&gt; "&amp;lt;/soap:Body&amp;gt;"+&lt;br /&gt; "&amp;lt;/soap:Envelope&amp;gt;";&lt;br /&gt;&lt;br /&gt;var xHReq1 = new ActiveXObject("Msxml2.XMLHTTP");&lt;br /&gt;xHReq1.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);&lt;br /&gt;xHReq1.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Update");&lt;br /&gt;xHReq1.setRequestHeader("Content-Type", "text/xml; charset=utf-8");&lt;br /&gt;xHReq1.setRequestHeader("Content-Length", xml1.length);&lt;br /&gt;xHReq1.send(xml1);&lt;br /&gt;// Capture the result&lt;br /&gt;var resultXml1 = xHReq1.responseXML;&lt;br /&gt;&lt;br /&gt;var errorCount1 = resultXml1.selectNodes('//error').length;&lt;br /&gt;}&lt;br /&gt;catch (e)&lt;br /&gt;{ }&lt;br /&gt;&lt;br /&gt;/* xml encoding to convert "&amp;" and single quote (') symbol*/&lt;br /&gt;function xmlencode(string) {&lt;br /&gt;    return string.replace(/\&amp;/g,'&amp;'+'amp;').replace(/&amp;lt;/g,'&amp;'+'lt;').replace(/&amp;gt;/g,'&amp;'+'gt;').replace(/\'/g,'&amp;'+'apos;').replace(/\"/g,'&amp;'+'quot;');&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-8785794547882073484?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/8785794547882073484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=8785794547882073484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/8785794547882073484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/8785794547882073484'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/crm-update-web-service-call-in-java.html' title='CRM update web service call in Java Script'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-410004411934551404</id><published>2010-06-25T04:13:00.001-07:00</published><updated>2010-06-25T04:14:38.035-07:00</updated><title type='text'>Set the account lookup when new contact is created from the Contact lookup new button in Account form</title><content type='html'>function getAccountLookup()&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;var stringXml = window.opener.document.getElementById("fetchxml").value;&lt;br /&gt;&lt;br /&gt;  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");&lt;br /&gt;  xmlDoc.async="false";&lt;br /&gt;  xmlDoc.loadXML(stringXml)&lt;br /&gt;    &lt;br /&gt;var name = xmlDoc.selectNodes('fetch/entity/filter/condition')[1].attributes[2].value;&lt;br /&gt;var id = xmlDoc.selectNodes('fetch/entity/filter/condition')[1].attributes[4].value;&lt;br /&gt;&lt;br /&gt;//Create an array to set as the DataValue for the lookup control. &lt;br /&gt;    var lookupData = new Array(); &lt;br /&gt; &lt;br /&gt;    //Create an Object add to the array. &lt;br /&gt;    var lookupItem= new Object(); &lt;br /&gt; &lt;br /&gt;    //Set the id, typename, and name properties to the object. &lt;br /&gt;    lookupItem.id = id; &lt;br /&gt;    lookupItem.typename = 'account'; &lt;br /&gt;    lookupItem.name = name; &lt;br /&gt; &lt;br /&gt;    // Add the object to the array. &lt;br /&gt;    lookupData[0] = lookupItem; &lt;br /&gt; &lt;br /&gt;    // Set the value of the lookup field to the value of the array. &lt;br /&gt;    crmForm.all.parentcustomerid.DataValue = lookupData; &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;catch (e)&lt;br /&gt;{}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-410004411934551404?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/410004411934551404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=410004411934551404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/410004411934551404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/410004411934551404'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/set-account-lookup-when-new-contact-is.html' title='Set the account lookup when new contact is created from the Contact lookup new button in Account form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-4086245526822414560</id><published>2010-06-25T03:44:00.000-07:00</published><updated>2010-06-25T03:45:13.947-07:00</updated><title type='text'>Remove Add Existing Button From CRM Iframe</title><content type='html'>/* _MBtoplocAssocOneToMany2contactcustomeraccounts is the Id of the AddExisting button appearing in CRM grid. this id can be find out using IE developer tool bar */&lt;br /&gt;&lt;br /&gt;function RemoveAddExistingFromIframe()&lt;br /&gt;{&lt;br /&gt;    var iFrame1 = null;&lt;br /&gt;    iFrame1 = crmForm.all.IFRAME_Test;&lt;br /&gt;    var iDoc1 = iFrame1.contentWindow.document;&lt;br /&gt;    iFrame1.attachEvent( "onreadystatechange" , Ready1);&lt;br /&gt;    RemoveWhiteSpace(iFrame1);      &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function Ready1()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    var iFrame1 = crmForm.all.IFRAME_Test;&lt;br /&gt;    var iDoc1 = iFrame1.contentWindow.document;&lt;br /&gt;    if(iDoc1.getElementById("_MBtoplocAssocOneToMany2contactcustomeraccounts") != null)&lt;br /&gt;    iDoc1.getElementById("_MBtoplocAssocOneToMany2contactcustomeraccounts").style.display = "none"; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function RemoveWhiteSpace(iframe)&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt; var IFRAME_test = iframe;&lt;br /&gt;  IFRAME_test.onreadystatechange = function ()&lt;br /&gt;  {&lt;br /&gt;   if( IFRAME_test.readyState != 'complete' ) &lt;br /&gt;    return;&lt;br /&gt;   IFRAME_test.style.border = "0px";&lt;br /&gt;   var IframeWindo = IFRAME_test.contentWindow;&lt;br /&gt;    IframeWindo.document.body.scroll = "no";&lt;br /&gt;    IframeWindo.document.body.childNodes[0].rows[0].cells[0].style.padding = "0px";   &lt;br /&gt;  }  &lt;br /&gt;  }catch (e)&lt;br /&gt;{alert('Error : '+e);}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-4086245526822414560?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/4086245526822414560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=4086245526822414560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/4086245526822414560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/4086245526822414560'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/remove-add-existing-button-from-crm.html' title='Remove Add Existing Button From CRM Iframe'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-127941239092372682</id><published>2010-06-25T03:01:00.000-07:00</published><updated>2010-06-25T03:03:19.802-07:00</updated><title type='text'>Hide CRM form Button/menu/sort cuts/isv buttons</title><content type='html'>function HideISVButtons()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    var toolBar = document.getElementById('mnuBar1');&lt;br /&gt;    if (toolBar != null &amp;&amp; toolBar.rows.length &amp;gt; 0 &amp;&amp; toolBar.rows[0].cells.length &amp;gt; 0) &lt;br /&gt;    {&lt;br /&gt;        try &lt;br /&gt;        {  &lt;br /&gt;&lt;br /&gt;            var toolBarItems = toolBar.rows[0].cells[0].getElementsByTagName('li')&lt;br /&gt;            if (toolBarItems != null &amp;&amp; toolBarItems.length &amp;gt; 0) {&lt;br /&gt;                for (var i = 0; i &amp;lt; toolBarItems.length; i++) {&lt;br /&gt;                    var toolBarbuttonName = toolBarItems[i].getAttribute('title');&lt;br /&gt;                    switch (toolBarbuttonName) {&lt;br /&gt;                        case "Attach a File":&lt;br /&gt;                            toolBarItems[i].style.display = 'none';&lt;br /&gt;                            toolBarItems[i - 1].style.display = 'none';&lt;br /&gt;                            break;&lt;br /&gt;                        case "Print Preview":&lt;br /&gt;                            toolBarItems[i].style.display = 'none';                           &lt;br /&gt;                            break;&lt;br /&gt;                        case "Actions":&lt;br /&gt;                            toolBarItems[i].style.display = 'none';&lt;br /&gt;                            toolBarItems[i - 1].style.display = 'none';&lt;br /&gt;                            break;&lt;br /&gt;                            break;&lt;br /&gt;                        case "Follow Up":&lt;br /&gt;                            toolBarItems[i].style.display = 'none';&lt;br /&gt;                            toolBarItems[i - 1].style.display = 'none';&lt;br /&gt;                            break;&lt;br /&gt;                        case "Test ISV Button":                            &lt;br /&gt;       toolBarItems[i].style.display = 'none';&lt;br /&gt;       toolBarItems[i - 1].style.display = 'none';&lt;br /&gt;       toolBarItems[i + 1].style.display = 'none';                      break;                        &lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        } &lt;br /&gt;        catch (e)&lt;br /&gt; { }&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-127941239092372682?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/127941239092372682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=127941239092372682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/127941239092372682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/127941239092372682'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/hide-crm-form-buttonmenusort-cutsisv.html' title='Hide CRM form Button/menu/sort cuts/isv buttons'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-5478688185024821601</id><published>2010-06-25T02:38:00.000-07:00</published><updated>2010-11-06T06:14:16.763-07:00</updated><title type='text'>Advanced find view in an IFRAME in CRM from</title><content type='html'>// Fetch xml for the data we want to show in a CRM grid&lt;br /&gt;&lt;br /&gt;fetchXml = "&amp;lt;fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'&amp;gt;"+&lt;br /&gt;"&amp;lt;entity name='opportunity'&amp;gt;"+&lt;br /&gt;"&amp;lt;attribute name='name'/&amp;gt;"+&lt;br /&gt;"&amp;lt;attribute name='createdon'/&amp;gt;"+&lt;br /&gt;"&amp;lt;attribute name='ownerid'/&amp;gt;"+&lt;br /&gt;"&amp;lt;attribute name='new_finalstage'/&amp;gt;"+&lt;br /&gt;"&amp;lt;attribute name='opportunityid'/&amp;gt;"+&lt;br /&gt;"&amp;lt;order attribute='name' descending='false'/&amp;gt;"+&lt;br /&gt;"&amp;lt;filter type='and'&amp;gt;&amp;lt;condition attribute='statecode' operator='eq' value='0'/&amp;gt;&amp;lt;/filter&amp;gt;"+&lt;br /&gt;"&amp;lt;/entity&amp;gt;&amp;lt;/fetch&amp;gt;";&lt;br /&gt;&lt;br /&gt;/* Layout of the adv find Grid&lt;br /&gt;In object - is the objecttypecode of the result entity&lt;br /&gt;jump - is the name of the primary column in the result view */&lt;br /&gt;&lt;br /&gt;var layoutXml =  ""+&lt;br /&gt;"&amp;lt;grid name='resultset' object='3' jump='name' select='1' icon='1' preview='1'&amp;gt;"+&lt;br /&gt;"&amp;lt;row name='result' id='opportunity'&amp;gt;"+&lt;br /&gt;"&amp;lt;cell name='name' width='230' /&amp;gt;"+&lt;br /&gt;"&amp;lt;cell name='createdon' width='80' /&amp;gt;"+&lt;br /&gt;"&amp;lt;cell name='ownerid' width='120' /&amp;gt;"+&lt;br /&gt;"&amp;lt;cell name='new_finalstage' width='160' /&amp;gt;"+&lt;br /&gt;"&amp;lt;/row&amp;gt;"+&lt;br /&gt;"&amp;lt;/grid&amp;gt;";&lt;br /&gt;&lt;br /&gt;/* the main method to retrieve and bind the data to the CRM Grid according to the fetch XML and Layout XML&lt;br /&gt;IFRAME_TEST- an IFRAME to show the advance find view&lt;br /&gt;opportunity – is the main entity name&lt;br /&gt;fetchXml – the fetchXml query we want to retrieve from CRM&lt;br /&gt;layoutXml – the layout to show the retrieved data&lt;br /&gt;name – sorting of records in CRM advanced find grid&lt;br /&gt;false – sort order Descending &lt;br /&gt;{350D0AA8-3EF5-496B-A714-15B2DE896D20} – advance find view id for the same entity (opportunity) */ &lt;br /&gt;&lt;br /&gt;EmbedAdvancedFindView("IFRAME_TEST", "opportunity", fetchXml, layoutXml, "name", "false", "{350D0AA8-3EF5-496B-A714-15B2DE896D20}");  &lt;br /&gt; &lt;br /&gt;// to remove the toolbar items from the advance find grid&lt;br /&gt;var iFrame1 = null;&lt;br /&gt;iFrame1 = crmForm.all.IFRAME_TEST;&lt;br /&gt;var iDoc1 = iFrame1.contentWindow.document;&lt;br /&gt;iFrame1.attachEvent( "onreadystatechange" , Ready1);&lt;br /&gt;RemoveWhiteSpace(iFrame1);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function Ready1(){&lt;br /&gt;try{&lt;br /&gt;var iFrame = crmForm.all.IFRAME_TEST;&lt;br /&gt;    var iDoc1 = iFrame.contentWindow.document;&lt;br /&gt;     if(iDoc1.getElementById("gridMenuBar") != null)&lt;br /&gt;       iDoc1.getElementById("gridMenuBar").style.display = "none"; &lt;br /&gt;       }catch (e)&lt;br /&gt;{}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function EmbedAdvancedFindView(iFrameId, entityName, fetchXml, layoutXml, sortCol, sortDescend, defaultAdvFindViewId) {&lt;br /&gt;    try {&lt;br /&gt;        &lt;br /&gt;        var iFrame = document.getElementById(iFrameId);&lt;br /&gt;        var httpObj = new ActiveXObject("Msxml2.XMLHTTP");&lt;br /&gt;        var url = "/" + ORG_UNIQUE_NAME + "/advancedFind/fetchData.aspx";&lt;br /&gt;        &lt;br /&gt;        var params = "FetchXML=" + fetchXml&lt;br /&gt;   + "&amp;LayoutXML=" + layoutXml&lt;br /&gt;   + "&amp;EntityName=" + entityName&lt;br /&gt;   + "&amp;DefaultAdvFindViewId=" + defaultAdvFindViewId&lt;br /&gt;   + "&amp;ViewType=1039" // According to Michael Hohne over at Stunnware&lt;br /&gt;   + "&amp;SortCol=" + sortCol&lt;br /&gt;   + "&amp;SortDescend=" + sortDescend;        &lt;br /&gt;&lt;br /&gt;        httpObj.Open("POST", url, true);       &lt;br /&gt;        &lt;br /&gt;        httpObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");&lt;br /&gt;        httpObj.setRequestHeader("Content-length", params.length);&lt;br /&gt;        &lt;br /&gt;        httpObj.onreadystatechange = function() {&lt;br /&gt;            if (httpObj.readyState == 4 &amp;&amp; httpObj.status == 200) {                &lt;br /&gt;                var doc = iFrame.contentWindow.document;                &lt;br /&gt;                iFrame.src = null;                &lt;br /&gt;                doc.open();&lt;br /&gt;                doc.write(httpObj.responseText);&lt;br /&gt;                doc.close();&lt;br /&gt;                &lt;br /&gt;                doc.body.style.padding = "0px";&lt;br /&gt;                doc.body.style.backgroundColor = "#eaf3ff";&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        httpObj.send(params);&lt;br /&gt;    }&lt;br /&gt;    catch (e) {&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// to expand the adv find grid to full width &lt;br /&gt;function RemoveWhiteSpace(iframe)&lt;br /&gt;{&lt;br /&gt;var IFRAME_test = iframe;&lt;br /&gt;IFRAME_test.onreadystatechange = function ()&lt;br /&gt;{&lt;br /&gt;if( IFRAME_test.readyState != 'complete' )&lt;br /&gt;return;&lt;br /&gt;IFRAME_test.style.border = "0px";&lt;br /&gt;var IframeWindo = IFRAME_test.contentWindow;&lt;br /&gt;if(IframeWindo.document.body.childNodes[0]!=null){&lt;br /&gt;if(IframeWindo.document.body.childNodes[0].rows!=null){&lt;br /&gt;IframeWindo.document.body.scroll = "no";&lt;br /&gt;IframeWindo.document.body.childNodes[0].rows[0].cells[0].style.padding = "0px";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-5478688185024821601?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/5478688185024821601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=5478688185024821601' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5478688185024821601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5478688185024821601'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/advanced-find-view-in-iframe-in-crm.html' title='Advanced find view in an IFRAME in CRM from'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-76821753087829022</id><published>2010-06-24T23:02:00.000-07:00</published><updated>2010-06-24T23:29:03.366-07:00</updated><title type='text'>Xmlencode the text in fetchXML in Jscript</title><content type='html'>While passing text as a parameter in fetchXml in CRM OnLoad/OnSave/OnChange event Jscript, it required to xmlencode the text before use the same as parameter.&lt;br /&gt;This is because the fetchXml contains “&amp;” or single quote(‘) is not executed in Jscript CRM service call. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function xmlencode(string) {&lt;br /&gt;    return string.replace(/\&amp;/g,'&amp;'+'amp;').replace(/&lt;/g,'&amp;'+'lt;').replace(/&gt;/g,'&amp;'+'gt;').replace(/\'/g,'&amp;'+'apos;').replace(/\"/g,'&amp;'+'quot;');&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-76821753087829022?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/76821753087829022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=76821753087829022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/76821753087829022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/76821753087829022'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/xmlencode-text-in-fetchxml-in-jscript.html' title='Xmlencode the text in fetchXML in Jscript'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-3215923256653012941</id><published>2010-06-24T22:37:00.000-07:00</published><updated>2010-06-24T22:38:12.818-07:00</updated><title type='text'>Refresh a CRM grid on the CRM Form</title><content type='html'>try &lt;br /&gt;{&lt;br /&gt;var _locAssocObj = locAssocObj;&lt;br /&gt;locAssocObj = this.locAssocObj;&lt;br /&gt;&lt;br /&gt;//fucntion definition for overloading the N:N Grid association&lt;br /&gt;this.locAssocObj = function(iType, sSubType, sAssociationName, iRoleOrdinal) {&lt;br /&gt;_locAssocObj(iType, sSubType, sAssociationName, iRoleOrdinal);&lt;br /&gt;switch (sAssociationName) {&lt;br /&gt; case "new_new_opportunity_systemuser":&lt;br /&gt; crmForm.all.IFRAME_OpportunityUser.contentWindow.document.all.crmGrid.Refresh();&lt;br /&gt; break;                           &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;} catch (e)&lt;br /&gt;{ }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;“sAssociationName” is the relationship name (we can find this in entity customization).&lt;br /&gt;Here there is an N:N relationship in between Opportunity and SystemUser named “new_new_opportunity_systemuser”. &lt;br /&gt;And the system user grid is there on the CRM. On addition/removal of any entry in the user list will refresh the corresponding grid.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-3215923256653012941?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/3215923256653012941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=3215923256653012941' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/3215923256653012941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/3215923256653012941'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/refresh-crm-grid-on-crm-form.html' title='Refresh a CRM grid on the CRM Form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-5577720747952657811</id><published>2010-06-24T22:24:00.000-07:00</published><updated>2010-06-24T22:27:59.376-07:00</updated><title type='text'>Set Focus to a field in CRM form</title><content type='html'>function SetFocustoaField() &lt;br /&gt;{&lt;br /&gt;        var oField = crmForm.all.roche_name;&lt;br /&gt;        oField.onblur = function() {&lt;br /&gt;            oField.SetFocus();&lt;br /&gt;            oField.onblur = null;&lt;br /&gt;        }&lt;br /&gt;        oField.SetFocus();&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-5577720747952657811?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/5577720747952657811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=5577720747952657811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5577720747952657811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5577720747952657811'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/set-focus-to-field-in-crm-form.html' title='Set Focus to a field in CRM form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-6036404794930618307</id><published>2010-06-24T22:12:00.000-07:00</published><updated>2010-06-24T22:23:51.189-07:00</updated><title type='text'>Call External JS file in CRM from OnLoad/OnSave/OnChange event</title><content type='html'>Take an example. I have a JS file named “Entity_OnLoad.js” in “ISV/Org_Name/JavaScript” folder. There is a method named “CommonAction” in “Entity_OnLoad.js” file.&lt;br /&gt;&lt;br /&gt;With the help of following Jscript we can call the “CommonAction” method from “Entity_OnLoad.js” in the OnLoad/OnSave/OnChange event of the CRM form.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var netRequest = new ActiveXObject("Msxml2.XMLHTTP");&lt;br /&gt;netRequest.open("GET", "/ISV/Org_Name/JavaScript/Entity_OnLoad.js", false);&lt;br /&gt;netRequest.send(null);&lt;br /&gt;eval(netRequest.responseText);&lt;br /&gt;&lt;br /&gt;CommonAction();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-6036404794930618307?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/6036404794930618307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=6036404794930618307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6036404794930618307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6036404794930618307'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/06/call-external-js-file-in-crm-from.html' title='Call External JS file in CRM from OnLoad/OnSave/OnChange event'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-8803206995969972575</id><published>2010-03-14T21:53:00.001-07:00</published><updated>2010-03-14T22:13:55.047-07:00</updated><title type='text'>Trigger N:N Association event and Dassiciation event in CRM Plugin</title><content type='html'>-- ===================================================================================================&lt;br /&gt;-- Enable Associate and Disassociate Plug-in Events &lt;br /&gt;-- execute the following query to CRM database, it will add two entries in SdkMessageFilterBase &lt;br /&gt;-- 'DisassociateEntities' and 'AssociateEntities' from SdkMessageBase which is not listed&lt;br /&gt;-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;USE CrmDev_MSCRM&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;-- Find the deployments SDK Filter ID for the&lt;br /&gt;-- Associate and Disassociate Entity SDK Messages&lt;br /&gt;DECLARE @DisassociateEntitiesFilterId uniqueidentifier&lt;br /&gt;DECLARE @AssociateEntitiesFilterId uniqueidentifier&lt;br /&gt;SET @DisassociateEntitiesFilterId = (SELECT SdkMessageId FROM SdkMessageBase WHERE [Name] = 'DisassociateEntities')&lt;br /&gt;SET @AssociateEntitiesFilterId = (SELECT SdkMessageId FROM SdkMessageBase WHERE [Name] = 'AssociateEntities')&lt;br /&gt;&lt;br /&gt;-- Enable the Associate and Disassociate Filters to be valid for custom processing&lt;br /&gt;-- Custom Processing means "you register plug-ins against it"&lt;br /&gt;-- Note: We only do this for the "generic" (OTC == 0) case, just to be safer&lt;br /&gt;UPDATE SdkMessageFilterBase SET IsCustomProcessingStepAllowed = 1       WHERE SdkMessageId = @DisassociateEntitiesFilterId AND PrimaryObjectTypeCode = 0&lt;br /&gt;UPDATE SdkMessageFilterBase SET IsCustomProcessingStepAllowed = 1       WHERE SdkMessageId = @AssociateEntitiesFilterId AND PrimaryObjectTypeCode = 0&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;The above query will enable the 'DisassociateEntities' and 'AssociateEntities' message in the plugin registration tool. While registering the plugin select the entity name as ‘none’&lt;br /&gt;&lt;br /&gt;While executing the plugin you will be getting four parameter as input parameters from the plugin context along with the other properties : &lt;br /&gt;&lt;br /&gt;1. Related Entity1 guid and entity name&lt;br /&gt;2. Related Entity2 guid and entity name&lt;br /&gt;3. Relation hsip name (nothing but intersect hidden N:N entity name)&lt;br /&gt;4. Optional parameter.&lt;br /&gt;&lt;br /&gt;Using these value you can implement you logic.&lt;br /&gt;&lt;br /&gt;Sample Code for N:N relationship with a custom entity and Sytem User:&lt;br /&gt;&lt;br /&gt;public void Execute(IPluginExecutionContext context)&lt;br /&gt;{            &lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;        crmservice = context.CreateCrmService(true);&lt;br /&gt;&lt;br /&gt;        if (context.MessageName == "AssociateEntities")&lt;br /&gt;        {                     &lt;br /&gt;           &lt;br /&gt;            if (context.InputParameters.Properties["RelationshipName"].ToString() == "new_new_customentity_systemuser")&lt;br /&gt;            {&lt;br /&gt;                string oId = string.Empty;&lt;br /&gt;                string SharedUserId = string.Empty;&lt;br /&gt;                               &lt;br /&gt;                oId = (context.InputParameters.Properties["Moniker1"] as Moniker).Id.ToString();&lt;br /&gt; &lt;br /&gt;                SharedUserId = (context.InputParameters.Properties["Moniker2"] as Moniker).Id.ToString();&lt;br /&gt;&lt;br /&gt;  // write you logic here&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    catch (System.Web.Services.Protocols.SoapException ex)&lt;br /&gt;    {&lt;br /&gt;        LogWriter.LogInfo(ex.ToString());&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    catch (Exception ex)&lt;br /&gt;    {&lt;br /&gt;        LogWriter.LogInfo(ex.ToString());&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Note : As we have defined 'none' as the entity name while registering the plugin, so this plugin will get triggered when ever user will do add existing or romove existing, for any entity. So while writing the logic relationship name is required to identify from where plugin has been triggered. &lt;br /&gt; &lt;br /&gt;Referance : &lt;a href="http://consulting.ascentium.com/blog/crm/Post533.aspx"&gt;http://consulting.ascentium.com/blog/crm/Post533.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-8803206995969972575?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/8803206995969972575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=8803206995969972575' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/8803206995969972575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/8803206995969972575'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/03/trigger-nn-association-event-and.html' title='Trigger N:N Association event and Dassiciation event in CRM Plugin'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-5795959478455744000</id><published>2010-03-12T07:57:00.000-08:00</published><updated>2010-03-12T08:10:15.636-08:00</updated><title type='text'>Disable CRM form</title><content type='html'>Here is the JScript to Disable all the fields/attributes of the CRM From.&lt;br /&gt;&lt;br /&gt;function DisableForm() {&lt;br /&gt;    var iLen = crmForm.all.length;&lt;br /&gt;    for (i = 0; i &lt; iLen; i++) {&lt;br /&gt;        crmForm.all[i].Disabled = true;&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-5795959478455744000?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/5795959478455744000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=5795959478455744000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5795959478455744000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5795959478455744000'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/03/disable-crm-form.html' title='Disable CRM form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-1177660806891260135</id><published>2010-03-12T07:56:00.000-08:00</published><updated>2010-03-12T08:10:36.680-08:00</updated><title type='text'>HIde Left Nav Bar of CRM from</title><content type='html'>Here is the JScript to hide the left navigation area (completly) of any CRM form.&lt;br /&gt;&lt;br /&gt;document.all.crmNavBar.parentElement.style.display = "none";&lt;br /&gt;document.all.tdAreas.colSpan = 2;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-1177660806891260135?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/1177660806891260135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=1177660806891260135' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1177660806891260135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1177660806891260135'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/03/hide-left-nav-bar-of-crm-from.html' title='HIde Left Nav Bar of CRM from'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-6221504806311945907</id><published>2010-03-12T07:54:00.001-08:00</published><updated>2010-03-12T08:08:45.049-08:00</updated><title type='text'>Maximize the CRM form</title><content type='html'>Here is the JScript to maximise the CRM form. &lt;br /&gt;&lt;br /&gt;window.moveTo(0, 0);&lt;br /&gt;window.resizeTo(screen.availWidth, screen.availHeight);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-6221504806311945907?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/6221504806311945907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=6221504806311945907' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6221504806311945907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6221504806311945907'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/03/maximize-crm-form.html' title='Maximize the CRM form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-4003219940444095351</id><published>2010-03-12T07:45:00.000-08:00</published><updated>2010-03-14T21:31:15.122-07:00</updated><title type='text'>Button on CRM form</title><content type='html'>There is a workaround of creating a button on the CRM form.&lt;br /&gt;The logic behind is , just place a text box attribute on the CRM form, hide the label/textbox of the corresponding attribute and make the textbox/label (other half) of the same attribute to a button.&lt;br /&gt;&lt;br /&gt;Here we have an attribute name new_button (textbox). The first half(label) has been made hidden always and second half of the attribute (textbox) has been converted to a button. And the event has been added to the button.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;crmForm.all.new_ button_c.style.display = 'none'&lt;br /&gt;crmForm.all.new_button_d.innerHTML = "&amp;lt;button class='ms-crm-Button' onclick='ButtonClick();'&amp;gt;Click Here&amp;lt;/button&amp;gt;";&lt;br /&gt;&lt;br /&gt;ButtonClick = function() {&lt;br /&gt;//  write your logic here..&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-4003219940444095351?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/4003219940444095351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=4003219940444095351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/4003219940444095351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/4003219940444095351'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/03/button-on-crm-form.html' title='Button on CRM form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-5558022440603337550</id><published>2010-02-14T23:04:00.000-08:00</published><updated>2010-02-14T23:06:10.008-08:00</updated><title type='text'>More Than 8 Tabs on a CRM Form</title><content type='html'>Friends,&lt;br /&gt;&lt;br /&gt;We can have more than 8 tabs on a CRM Form if required. (It is unsupported but very easy to implement).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Procedure : &lt;br /&gt;In: C:\Program Files\Microsoft CRM Server\CRMWeb\Tools\FormEditor find your formeditor.aspx and select edit. Find the JavaScript variable _iMaxTabs and notice that it is set to 8. Change the value to your desired limitation, save and close, reset IIS and you should then be able to create the additional tabs needed from within the forms customization area.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note : This change will be refelected in all the CRM form.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-5558022440603337550?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/5558022440603337550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=5558022440603337550' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5558022440603337550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5558022440603337550'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/02/more-than-8-tabs-on-crm-form.html' title='More Than 8 Tabs on a CRM Form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-1521474635484450025</id><published>2010-02-03T06:41:00.000-08:00</published><updated>2010-02-03T06:42:45.719-08:00</updated><title type='text'>Changing the entity’s default print preview</title><content type='html'>http://adrian-alexan.blogspot.com/2009/12/customizing-entities-print-preview-form.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-1521474635484450025?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/1521474635484450025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=1521474635484450025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1521474635484450025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1521474635484450025'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/02/changing-entitys-default-print-preview.html' title='Changing the entity’s default print preview'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-2923298758324392674</id><published>2010-02-01T23:19:00.000-08:00</published><updated>2010-02-03T04:29:37.408-08:00</updated><title type='text'>Custom Entities are not available for Mail Merge</title><content type='html'>As we all know in CRM 4.0 most of the entities(including the custom entities) are available for the Mail Merge. But often we see that few custom entities are not available while Mail Merge.&lt;br /&gt;&lt;br /&gt;This happen only when we import CRM 3.0 customization to the CRM 4.0 CRM. Actually in CRM 3.0 Mail Merge future was not available for custom entity and custom attribute added to the system entity.&lt;br /&gt;So when we import 3.0 customization to 4.0 still Mail Merge future has not been added to the custom entity. Even we don’t have anything in CRM so that we can enable (Or disable) the mail merge future for an entity from UI.&lt;br /&gt;&lt;br /&gt;But there is a work around to enable the Mail Merge future for the custom entity.&lt;br /&gt;&lt;br /&gt;Export the entity customization, open the customization.xml in Visual Studio. In bottom of the xml file you will see the xml nodes named like &lt;isoutlookenabled&gt;&amp;lt;IsoutlookEnabled&amp;gt;, &amp;lt;IsDuplicateDetectionEnabled&amp;gt; &lt;isduplicatedetectionenabled&gt;.&lt;br /&gt;Likewise we need to add one more node as &amp;lt;IsMailMergeEnabled&amp;gt; and set the value as "yes".&lt;br /&gt;&lt;br /&gt;Save and close the customization.xml and import the same to the CRM. Wait for 2-3 minutes lets synchronized the customization with the outlook. Close and launch the outlook again and start the Mail Merge for the corresponding entity.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note – These steps we need to follow for every custom entity. Be very care full while making changes in Customization.xml.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-2923298758324392674?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/2923298758324392674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=2923298758324392674' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2923298758324392674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2923298758324392674'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/02/custom-entities-are-not-available-for.html' title='Custom Entities are not available for Mail Merge'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-251431443469342700</id><published>2010-02-01T05:10:00.000-08:00</published><updated>2010-02-01T05:11:36.058-08:00</updated><title type='text'>Disabled Fields in Bulk Edit</title><content type='html'>When we do Bulk Edit in MSCRM, we see few fields has been disabled or in read only format. We can’t provide any input to those fields.&lt;br /&gt;&lt;br /&gt;This is because if we have enabled the OnChange event for the fields, those fields appear as disabled on the Bulk Edit form. This is because for multiple records CRM won’t be able to trigger the OnChange event and take the defined action in OnChange Jscript.&lt;br /&gt;&lt;br /&gt;Note - Even though we don’t have any Jscript in OnChange event of the field but if we have enabled the OnChange event, the corresponding field will appear as read only.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-251431443469342700?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/251431443469342700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=251431443469342700' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/251431443469342700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/251431443469342700'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2010/02/disabled-fields-in-bulk-edit.html' title='Disabled Fields in Bulk Edit'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-2754130423814687732</id><published>2009-10-29T23:51:00.000-07:00</published><updated>2009-10-29T23:52:51.644-07:00</updated><title type='text'>Auto Numbers in Microsoft Dynamics CRM</title><content type='html'>I was looking for the simple, supported and mostly acceptable way of auto numbering and got in some blog to use a custom entity in CRM called AutoNumber that tracks the max used autonumber by entity type.&lt;br /&gt;&lt;br /&gt;Use a post create callout to populate corresponding  entity type’s max value + 1 to the newly-created record, and also to write that new max value to the entry in the AutoNumber record for the entity type.&lt;br /&gt;&lt;br /&gt;That way the process fires when offline clients sync their new records to the central database and you end up with no duplicate record contention, since that part of the post callout is (I believe) transaction bound to ensure we don’t get dupes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There is another simple, supported and mostly acceptable way of auto numbering suggested by “Ayaz Ahmad”.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Read the autonumber attribute Max value and then add 1 to get next auto number. For example you have a custom entity named Project and you want to auto number Project_Ref_Number attribute.  But do not retrieve all records. Just retrieve the record with maximum number value by using following two properties of PageInfo Class in SDK and set descending order.&lt;br /&gt;&lt;br /&gt;PageInfo.Count = 1;&lt;br /&gt;PageInfo.PageNumber = 1;&lt;br /&gt;&lt;br /&gt;Code:-&lt;br /&gt;&lt;br /&gt;ColumnSet cols = new ColumnSet();&lt;br /&gt;cols.AddColumns(new string[] { "leadid", "new_autonumber" });&lt;br /&gt;&lt;br /&gt;PagingInfo pages = new PagingInfo();&lt;br /&gt;pages.PageNumber = 1;&lt;br /&gt;pages.Count = 1;&lt;br /&gt;&lt;br /&gt;QueryExpression query = new QueryExpression();&lt;br /&gt;query.EntityName = EntityName.lead.ToString();&lt;br /&gt;query.ColumnSet = cols;&lt;br /&gt;query.AddOrder("new_autonumber", OrderType.Descending);&lt;br /&gt;query.PageInfo = pages;&lt;br /&gt;&lt;br /&gt;RetrieveMultipleRequest request = new RetrieveMultipleRequest();&lt;br /&gt;request.ReturnDynamicEntities = true;&lt;br /&gt;request.Query = query;&lt;br /&gt;&lt;br /&gt;RetrieveMultipleResponse retrieved = (RetrieveMultipleResponse)service.Execute(request);&lt;br /&gt;&lt;br /&gt;if (retrieved.BusinessEntityCollection.BusinessEntities.Count &gt; 0)&lt;br /&gt;{&lt;br /&gt;    DynamicEntity results = (DynamicEntity)retrieved.BusinessEntityCollection.BusinessEntities[0];&lt;br /&gt;    if (results.Properties.Contains("new_autonumber"))&lt;br /&gt;    {&lt;br /&gt;        nextNumber = Convert.ToInt32(results.Properties["new_autonumber"].ToString()) + 1;&lt;br /&gt;        //add nextNumber as the entity property for the coresponding entity&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;One more consideration should be taken in account to register your auto number plugin to at PreCreate rather at PostCreate.&lt;br /&gt;&lt;br /&gt;Limitation:&lt;br /&gt;In multi-user environment, this approach can come up with duplicate numbers in Project_Ref_Number when more than one user is creating project records.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-2754130423814687732?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/2754130423814687732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=2754130423814687732' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2754130423814687732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2754130423814687732'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/10/auto-numbers-in-microsoft-dynamics-crm.html' title='Auto Numbers in Microsoft Dynamics CRM'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-7748719043073274702</id><published>2009-10-28T23:00:00.000-07:00</published><updated>2009-10-28T23:09:56.320-07:00</updated><title type='text'>Datetime format in SSRS report while running in CRM/Web App</title><content type='html'>When we run our report in CRM/ Web App automatically date format get change from MM/DD/YYYY to DD/MM/YYYY or vice versa in report parameters.&lt;br /&gt;&lt;div&gt;&lt;p&gt;Actually this is the limitation of the reporting service. By default the “language property of the report” is US English. But when we run the report in Client browser the date time format get decided by the Language settings of client browser not by the language property of the report.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The format of date time parameter is always decided by the Language settings of client browser regardless of the Language property of our report (or in CRM).&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Examples:-&lt;br /&gt;If we have the Client browser language settings in English (AU), the date format in parameter bar will be as (regardless of the Language property of our report (or in CRM)):-&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5397898189160823842" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 488px; CURSOR: hand; HEIGHT: 207px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Bl5oYDDqp6Q/SukvzcKnvCI/AAAAAAAACpk/gWMmpT6hRcs/s320/1.jpg" border="0" /&gt; But when we run the same in the Client browser where language settings is in French (Canada) the date format in parameter bar will be as (regardless of the Language property of our report (or in CRM)):- &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5397899182530932354" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 437px; CURSOR: hand; HEIGHT: 209px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_Bl5oYDDqp6Q/SukwtQwgroI/AAAAAAAACps/mnE2ndkZDJc/s320/2.jpg" border="0" /&gt;We can change the date time format in the report data using&lt;br /&gt;1. CultureInfo (by adding the vb script in code section of the report) in Web App&lt;br /&gt;2. CRM_CalendarTypeCode from the user settings in CRM. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-7748719043073274702?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/7748719043073274702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=7748719043073274702' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/7748719043073274702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/7748719043073274702'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/10/datetime-format-in-ssrs-report-while.html' title='Datetime format in SSRS report while running in CRM/Web App'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Bl5oYDDqp6Q/SukvzcKnvCI/AAAAAAAACpk/gWMmpT6hRcs/s72-c/1.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-962831910528070959</id><published>2009-10-19T01:37:00.000-07:00</published><updated>2009-10-19T01:40:38.683-07:00</updated><title type='text'>OnLoad, Onsave and OnChange code sharing/reuse</title><content type='html'>There are three events in CRM form, OnLoad, OnSave, OnChange. OnLoad and OnSave are in the form level and OnChange is in field level. Sometimes it’s needed to write the same code/method in OnLoad, or Onsave or OnChange or all three events.&lt;br /&gt;&lt;br /&gt;Actually these events trigger in a sequence, first OnLoad then OnChange (if any) and finally OnSave. So whatever methods we have written in the OnLoad of the form it will be available in OnChange and OnSave of the form.&lt;br /&gt;&lt;br /&gt;If there are any method/methods in OnLoad event we can reuse those methods in OnChange event of any field and OnSave of the form just by calling the method (no need to redefine the method definition again).&lt;br /&gt;&lt;br /&gt;And also sometimes it’s required to write the same code what we have in OnChange of any field in OnLoad/OnSave. We can achieve the same just by calling the OnChange code of the field using “&amp;lt;field_Schema&amp;gt;_onchange0();” method.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-962831910528070959?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/962831910528070959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=962831910528070959' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/962831910528070959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/962831910528070959'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/10/onload-onsave-and-onchange-code.html' title='OnLoad, Onsave and OnChange code sharing/reuse'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-2999796887747576938</id><published>2009-10-13T23:44:00.000-07:00</published><updated>2010-06-24T22:48:20.995-07:00</updated><title type='text'>UserId of the Calling User</title><content type='html'>function GetCurrentUserInfo() {&lt;br /&gt;    var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");&lt;br /&gt;    xmlhttp.open("POST", "/mscrmservices/2007/crmservice.asmx", false);&lt;br /&gt;    xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");&lt;br /&gt;    xmlhttp.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Execute");&lt;br /&gt;    var soapBody = "&amp;lt;soap:Body&amp;gt;" +&lt;br /&gt;    "&amp;lt;Execute xmlns='http://schemas.microsoft.com/crm/2007/WebServices'&amp;gt;" +&lt;br /&gt;    "&amp;lt;Request xsi:type='WhoAmIRequest' /&amp;gt;" +&lt;br /&gt;    "&amp;lt;/Execute&amp;gt;&amp;lt;/soap:Body&amp;gt;";&lt;br /&gt;    var soapXml = "&amp;lt;soap:Envelope " +&lt;br /&gt;    "xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' " +&lt;br /&gt;    "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " +&lt;br /&gt;    "xmlns:xsd='http://www.w3.org/2001/XMLSchema'&amp;gt;";&lt;br /&gt;    soapXml += GenerateAuthenticationHeader();&lt;br /&gt;    soapXml += soapBody;&lt;br /&gt;    soapXml += "&amp;lt;/soap:Envelope&amp;gt;";&lt;br /&gt;    xmlhttp.send(soapXml);&lt;br /&gt;    xmlDoc = new ActiveXObject("Microsoft.XMLDOM");&lt;br /&gt;    xmlDoc.async = false;&lt;br /&gt;    xmlDoc.loadXML(xmlhttp.responseXML.xml);&lt;br /&gt;    var userid = xmlDoc.getElementsByTagName("UserId")[0].childNodes[0].nodeValue;&lt;br /&gt;&lt;br /&gt;    return userid;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-2999796887747576938?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/2999796887747576938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=2999796887747576938' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2999796887747576938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2999796887747576938'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/10/userid-of-calling-user.html' title='UserId of the Calling User'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-2433824553796313650</id><published>2009-10-13T23:19:00.000-07:00</published><updated>2009-10-13T23:20:25.986-07:00</updated><title type='text'>How to edit the list of entities displayed in the Look for picklist in Lookup window</title><content type='html'>The regarding lookup windows generally display a list of all entities that can be associated with an activity. Quite often this feature becomes quite an issue with the users always having to select the appropriate entity from the list before applying the search. The longer the list of entities the more time consuming it is to search using the lookup window.It would be a boon to have only selected entities in the list. Well this is not available for customization through the CRM customization area. But it could be done by adding the Jscript to onload of the form.&lt;br /&gt;&lt;br /&gt;There are few properties of the Lookup control being set when we open a form and those are “Lookup Types”, “Lookup Type names” ,”Lookup Type Icons” and “default type”.&lt;br /&gt;&lt;br /&gt;We need to over load the default settings by writing our own logic in onload of the form to load specific list of entities to show up in the Look for section.&lt;br /&gt;&lt;br /&gt;/*Give the entity type code that you want in below script we want to show account, contact, Lead and Opportunity in order in the list */&lt;br /&gt;crmForm.all.regardingobjectid.lookuptypes = "1,2,3,4";&lt;br /&gt;&lt;br /&gt;/*Make sure you set the path of the entity images correctly for the list specified above */&lt;br /&gt;crmForm.all.regardingobjectid.lookuptypeIcons = "/_imgs/ico_16_1.gif:/_imgs/ico_16_2.gif:/_imgs/ico_16_3.gif:/_imgs/ico_16_4.gif:";&lt;br /&gt;&lt;br /&gt;/*The below script is to set default entity in the multiple entity lookup. Here we set the default entity to be Opportunity */&lt;br /&gt;crmForm.all.regardingobjectid.defaulttype = "3";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Above example will show Account, Contact, Opportunity and Lead in the Look For entity list and default entity is Opportunity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-2433824553796313650?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/2433824553796313650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=2433824553796313650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2433824553796313650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2433824553796313650'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/10/how-to-edit-list-of-entities-displayed.html' title='How to edit the list of entities displayed in the Look for picklist in Lookup window'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-3471913458612242451</id><published>2009-09-30T01:44:00.000-07:00</published><updated>2009-09-30T01:55:21.072-07:00</updated><title type='text'>Appropriate W3P.exe instance while debugging the CRM App</title><content type='html'>There are more than one W3P.exe instances running in a CRM system (CRM app pool, reporting service etc). While debugging the MSCRM Application sometimes we get more than one W3P.exe instances. And usually we attach all those instances which slowdowns the processing of the system.&lt;br /&gt;&lt;br /&gt;It’s unnecessary overload on system processing. We can avoid this by attaching the appropriate W3P.exe instance.&lt;br /&gt;&lt;br /&gt;To find out which instance to attach in debugger just run the &lt;strong&gt;IISAPP.VBS&lt;/strong&gt; in command prompt, it will list out all the W3P.exe instances with their port no. Now just match the port no of the CRM App Pool/ Default App Pool with the available processes list, attach the appropriate W3P.exe and start debugging.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-3471913458612242451?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/3471913458612242451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=3471913458612242451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/3471913458612242451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/3471913458612242451'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/appropriate-w3pexe-instance-while.html' title='Appropriate W3P.exe instance while debugging the CRM App'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-6768908202518659883</id><published>2009-09-29T03:54:00.000-07:00</published><updated>2009-09-29T03:57:31.055-07:00</updated><title type='text'>CRM Report error in case of Custom DB Object</title><content type='html'>While doing the reports for CRM, sometimes its required to create our own custom objects (like function, procedure or table) and use them in reports or to include some CRM tables(Entity, Attribute) in our Query. &lt;div&gt;&lt;br /&gt;When we use a custom object or CRM table in our Query it work perfectly for the admin user but it doesn’t work for the non-admin user. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;In this case we need to add the permission “NT Authority\Network Services” for that particular object in DB.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5386841216110129602" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 471px; CURSOR: hand; HEIGHT: 286px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Bl5oYDDqp6Q/SsHni5utccI/AAAAAAAACm4/1KulhxM85tc/s320/DB+object.jpg" border="0" /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-6768908202518659883?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/6768908202518659883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=6768908202518659883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6768908202518659883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6768908202518659883'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/crm-report-error-in-case-of-custom-db.html' title='CRM Report error in case of Custom DB Object'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Bl5oYDDqp6Q/SsHni5utccI/AAAAAAAACm4/1KulhxM85tc/s72-c/DB+object.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-6756595239281538678</id><published>2009-09-28T23:26:00.000-07:00</published><updated>2009-09-29T00:04:50.273-07:00</updated><title type='text'>Lookup: Retrieve Column values from Lookup window</title><content type='html'>if(crmForm.all.&amp;lt;lookupId&amp;gt;.DataValue != null)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;var entityId = document.getElementById( "&amp;lt;lookupId&amp;gt;");&lt;br /&gt;var lookupItems = entityId.items[0].values;&lt;br /&gt;&lt;br /&gt;alert(lookupItems[0].value); // First column value of Lookup&lt;br /&gt;alert(lookupItems[1].value); // Second column value of Lookup&lt;br /&gt;alert(lookupItems[2].value); // Third column value of Lookup&lt;br /&gt;alert(lookupItems[3].value); // Fourth column value of Lookup&lt;br /&gt;alert(lookupItems[4].value); // Fifht column value of Lookup&lt;br /&gt;alert(lookupItems[5].value); // Sixth column value of Lookup&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Note: You should disable the Automatic Resolution, so that users cannot add values automatically. This script will work only if the Lookup View is loaded.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-6756595239281538678?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/6756595239281538678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=6756595239281538678' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6756595239281538678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6756595239281538678'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/lookup-retrieve-column-values-from.html' title='Lookup: Retrieve Column values from Lookup window'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-7905908566873027564</id><published>2009-09-28T22:27:00.000-07:00</published><updated>2009-09-28T22:40:51.093-07:00</updated><title type='text'>Change the text and display of the navigation item</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div&gt;Change the text and display of the navigation item:-&lt;/div&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5386759731667214402" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 453px; CURSOR: hand; HEIGHT: 294px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_Bl5oYDDqp6Q/SsGdb4hnIEI/AAAAAAAACmw/rRNhR1ezYLg/s320/navItem.jpg" border="0" /&gt; &lt;div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;var iOpps = 0;&lt;br /&gt;if(document.getElementById('navOpps') != null)&lt;br /&gt;{&lt;br /&gt;document.getElementById('navOpps').getElementsByTagName('NOBR')[0].innerText =&lt;br /&gt;document.getElementById('navOpps').getElementsByTagName('NOBR')[0].innerText + " (" + iOpps + ")";&lt;br /&gt;document.getElementById('navOpps').getElementsByTagName('NOBR')[0].style.color = "#FF0000";&lt;br /&gt;document.getElementById('navOpps').getElementsByTagName('NOBR')[0].style.fontWeight = "700";&lt;br /&gt;}&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-7905908566873027564?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/7905908566873027564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=7905908566873027564' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/7905908566873027564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/7905908566873027564'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/change-text-and-display-of-navigation.html' title='Change the text and display of the navigation item'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Bl5oYDDqp6Q/SsGdb4hnIEI/AAAAAAAACmw/rRNhR1ezYLg/s72-c/navItem.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-6608261881649779919</id><published>2009-09-10T01:50:00.000-07:00</published><updated>2009-09-10T01:55:04.790-07:00</updated><title type='text'>Change the color of the service appointment / appointment in service calendar</title><content type='html'>In Service Management, there are Time Blocks displayed in the appointment book. The color of the time blocks varies according to the status of the appointment.  The section named “ServiceManagement” of isv.config.xml allows for customization of these colors by providing a mapping to the .css file that defines them. These .css files are located at &lt;install&gt;\SM\Gantt\style\GanttControl.css.aspx.&lt;br /&gt;&lt;br /&gt;Export and open the “isv.config”, search for the &lt;servicemanagement&gt;. Under the &lt;timeblocks&gt;, for every Status(1 – Requested, 2 – Tentative, 3 – Pending, 4 – Reserved, 6 - In Progress, 7 – Arrived, 8 – Completed, 9 – Canceled ,10 - No Show) CssClass has been defined.&lt;br /&gt;&lt;br /&gt;Open the GanttControl.css.aspx file using VS and search the CssClass name (like ganttBlockServiceActivityStatus1, ganttBlockServiceActivityStatus2) and change the color acording to your requirement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-6608261881649779919?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/6608261881649779919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=6608261881649779919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6608261881649779919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6608261881649779919'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/change-color-of-service-appointment.html' title='Change the color of the service appointment / appointment in service calendar'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-1155652146375330104</id><published>2009-09-09T05:17:00.000-07:00</published><updated>2009-09-10T02:26:28.923-07:00</updated><title type='text'>Script for hide 'Add existing button'</title><content type='html'>Sometimes it required to hide the “add existing” button from the grid. Here is the Jscript to achieve the same. There is a Test entity (custom entity) in Contact entity where I am hiding the “add existing” button.&lt;br /&gt;&lt;br /&gt;//Script for hide 'Add existing button'&lt;br /&gt;&lt;br /&gt;HideAddExistingButton('new_contact_test', ['Add existing Test to this record']);&lt;br /&gt;&lt;br /&gt;function HideAddExistingButton(relationshipName, buttonToolTip)&lt;br /&gt;{&lt;br /&gt;    var navElement = document.getElementById('nav_' + relationshipName);&lt;br /&gt;    if (navElement != null)&lt;br /&gt;    {&lt;br /&gt;        navElement.onclick = function LoadAreaOverride()&lt;br /&gt;        {&lt;br /&gt;            loadArea(relationshipName);&lt;br /&gt;            HideButton(document.getElementById(relationshipName + 'Frame'), buttonToolTip);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function HideButton(Iframe, buttonToolTip)&lt;br /&gt;{&lt;br /&gt;    Iframe.onreadystatechange = function HideTitledButtons()&lt;br /&gt;    {&lt;br /&gt;        if (Iframe.readyState == 'complete')&lt;br /&gt;        {&lt;br /&gt;            var iFrame = frames[window.event.srcElement.id];&lt;br /&gt;            var liElements = iFrame.document.getElementsByTagName('li');&lt;br /&gt;&lt;br /&gt;            for (var j = 0; j &lt; buttonToolTip.length; j++)&lt;br /&gt;            {&lt;br /&gt;                for (var i = 0; i &lt; liElements.length; i++)&lt;br /&gt;                {&lt;br /&gt;                    if (liElements[i].getAttribute('title') == buttonToolTip[j])&lt;br /&gt;                    {&lt;br /&gt;                        liElements[i].style.display = 'none';&lt;br /&gt;                        break;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;“relationshipName” you can get it from the entity customization, it’s basically the relationship name in between the entities.  “buttonToolTip” is the tool tip defined for the add exixting button.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-1155652146375330104?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/1155652146375330104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=1155652146375330104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1155652146375330104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1155652146375330104'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/script-for-hide-add-existing-button.html' title='Script for hide &apos;Add existing button&apos;'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-4680510778071069904</id><published>2009-09-03T00:06:00.000-07:00</published><updated>2009-09-03T01:20:32.010-07:00</updated><title type='text'>How to change the record title?</title><content type='html'>Sometimes we get requirement like change the opportunity title or account title , it should be in red color based on some condition or title should be combination of few fields there in the form.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5377139968700885042" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 622px; CURSOR: hand; HEIGHT: 223px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_Bl5oYDDqp6Q/Sp9wT-34qDI/AAAAAAAACho/Ar5if5bGzAY/s320/Opportunity+Title.jpg" border="0" /&gt;&lt;br /&gt;Here is the Jscript to achieve the same.&lt;br /&gt;&lt;br /&gt;//Change the Main Title&lt;br /&gt;var cells = document.getElementsByTagName("span");&lt;br /&gt;for (var i = 0; i &amp;lt; cells.length; i++)&lt;br /&gt;{&lt;br /&gt;      if (cells[i].className == "ms-crm-Form-Title")&lt;br /&gt;      {&lt;br /&gt;            cells[i].style.color = "#FF0000";&lt;br /&gt;            cells[i].style.fontWeight = "700";&lt;br /&gt;            break;&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-4680510778071069904?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/4680510778071069904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=4680510778071069904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/4680510778071069904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/4680510778071069904'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/how-to-change-record-title.html' title='How to change the record title?'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/Sp9wT-34qDI/AAAAAAAACho/Ar5if5bGzAY/s72-c/Opportunity+Title.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-6265543034021272681</id><published>2009-09-01T22:29:00.000-07:00</published><updated>2009-09-01T22:57:14.292-07:00</updated><title type='text'>Bulk 'save as completed/Cancel' of the CRM activities</title><content type='html'>There is no direct way to do the same in CRM. But there are workarounds you can achieve the same.&lt;br /&gt;1.    Create an ISV button on the grid tool bar. On click of this button you will the GUID of all the selected records (in the grid). Once you will get the GUID of all the activity, you can call web service using Jscript (AJAX call) and update these records as completed.  &lt;br /&gt;&lt;br /&gt;getSelected('crmGrid') will return you an array of the GUIDs of the selected records.&lt;br /&gt;&lt;br /&gt;Limitation – &lt;br /&gt;&lt;br /&gt;·         getSelected('crmGrid') method has a limitation , it will return you the GUID of max 50  records.&lt;br /&gt;&lt;br /&gt;·         After updating the activity using AJAX call, records will still appear in the grid, unless n until you will refresh the grid. &lt;br /&gt;&lt;br /&gt;2.       Create an ISV button on the grid tool bar. On click of this button you will the GUID of all the selected records (in the grid). Once you will get the GUID of all the activity, you call you own custom page, which will update those records as completed, and it will show you a user friendly message.  On close of this custom page refresh the grid. &lt;br /&gt;&lt;br /&gt;To Refresh the grid - crmGrid.Refresh();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-6265543034021272681?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/6265543034021272681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=6265543034021272681' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6265543034021272681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/6265543034021272681'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/bulk-save-as-completedcancel-of-crm.html' title='Bulk &apos;save as completed/Cancel&apos; of the CRM activities'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-7754258342895353902</id><published>2009-09-01T22:24:00.000-07:00</published><updated>2009-09-01T22:29:25.520-07:00</updated><title type='text'>limitation of creating the custom attributes in CRM</title><content type='html'>There is no limitation of creating the custom attributes in CRM. You can create n no of attributes within an entity. Bt as you know we have tables corresponding to each n every entity in the CRM DB and there is a limitation in database level. SQL Server allows up to 1024 columns per table and the amount of data stored in any row cannot exceed 8060 bytes. If so, while creating or updating CRM page will through SQL server error or sometimes it won’t allow you to perform any operation on this entity/records.&lt;br /&gt;&lt;br /&gt;You can determine the number of bytes available for entities by running the following query in &lt;organization&gt;_METABASE database.&lt;br /&gt;&lt;br /&gt;select e.Name, Bytes_Remaining = 8060 - (sum(a.length))from entity e&lt;br /&gt;join attribute a on e.entityid = a.entityidwhere a.iscustomfield = 1&lt;br /&gt;and a.islogical = 0group by e.Name&lt;br /&gt;&lt;br /&gt;You can determine the number of bytes used for entities by running the following query in &lt;organization&gt;_METABASE database.&lt;br /&gt;&lt;br /&gt;select e.Name, Physical_Size = sum(a.length)from entity e&lt;br /&gt;join attribute a on e.entityid = a.entityidwhere a.iscustomfield = 1&lt;br /&gt;and a.islogical = 0group by e.Name&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-7754258342895353902?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/7754258342895353902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=7754258342895353902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/7754258342895353902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/7754258342895353902'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/limitation-of-creating-custom.html' title='limitation of creating the custom attributes in CRM'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-237462540333111825</id><published>2009-09-01T02:31:00.000-07:00</published><updated>2009-09-01T02:32:31.117-07:00</updated><title type='text'>More than 10,000 records not returned by CRM service</title><content type='html'>There is a limitation in CRM service, when we retrieve data using&lt;br /&gt;RetrieveMultiple or fetch xml; actually it returns max 10,000 records.&lt;br /&gt;&lt;br /&gt;There is an unsupported way to increase the no of records returned by CRM service. You need to update the CRM DB.&lt;br /&gt;&lt;br /&gt;There is a table named   “OrganizationBase”, in this you have a column named “MaxRecordsForExportToExcel”, which defines the no of records returned by CRM service.&lt;br /&gt;&lt;br /&gt;By default this column has been set to 10,000, which we can change according to our requirement.&lt;br /&gt;&lt;br /&gt;Or we can use direct SQL query for the same.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-237462540333111825?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/237462540333111825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=237462540333111825' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/237462540333111825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/237462540333111825'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/09/more-than-10000-records-not-returned-by.html' title='More than 10,000 records not returned by CRM service'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-1250954170324871056</id><published>2009-08-31T21:50:00.000-07:00</published><updated>2009-08-31T21:53:37.276-07:00</updated><title type='text'>CRM Pre-Filtering:</title><content type='html'>&lt;strong&gt;CRM Pre-Filtering:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To enable the pre filtering in the report just we need to add an alias for the filtered views which starts with “CRMAF_”. A query such as “Select name from FilteredAccount” can simply be changed to “Select name from FilteredAccount as CRMAF_Account”. Aliasing the Filtered View with a prefix of CRMAF_ will allow CRM to recognize that you would like to enable this entity for pre-filtering.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you enable the CRM Pre-filtering functionality using the CRMAF_ method, CRM will take a query such as the following and modify it when it is uploaded into CRM:&lt;br /&gt;This is the sample query:-&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber&lt;br /&gt;FROM FilteredAccount as CRMAF_Account&lt;br /&gt;&lt;br /&gt;Becomes:&lt;br /&gt;SELECT name, accountnumber&lt;br /&gt;FROM (@P1) as CRMAF_Account&lt;br /&gt;&lt;br /&gt;Then CRM will pass a query to the P1 parameter depending on how the report is being filtered. For example: when we run the report from the Reports area, the Pre-filtering functionality show all Accounts that are Active, and the resulting query would be something like:&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber&lt;br /&gt;FROM (select FilteredAccount.* from FilteredAccount where statecode = 0) as CRMAF_Account&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If we are running the same report within a specific Account, the resulting query would be something like:&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber&lt;br /&gt;FROM (select FilteredAccount.* from FilteredAccount where AccountId = ‘&lt;currentaccountid&gt;’) as CRMAF_Account&lt;br /&gt;&lt;br /&gt;If we are running the same report for a list of Accounts (suppose 3 accounts are selected from a view), the resulting query would be something like:&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber&lt;br /&gt;FROM (select FilteredAccount.* from FilteredAccount where AccountId in (’&lt;1staccountid&gt;’, ‘&lt;2ndaccountid&gt;’, ‘&lt;3rdaccountid&gt;’) as CRMAF_Account&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-1250954170324871056?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/1250954170324871056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=1250954170324871056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1250954170324871056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1250954170324871056'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/crm-pre-filtering.html' title='CRM Pre-Filtering:'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-8110670115470753982</id><published>2009-08-31T01:09:00.001-07:00</published><updated>2009-08-31T01:09:49.062-07:00</updated><title type='text'>AJAX Calls using JavaScript to retrieve data for N:N relationship</title><content type='html'>//**************************************************&lt;br /&gt;//AJAX Call to get the Competitors for an Oportunity&lt;br /&gt;//**************************************************&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var sOppID = crmForm.ObjectId;&lt;br /&gt;&lt;br /&gt;var returnXML="";&lt;br /&gt;&lt;br /&gt;var xml = "" + &lt;br /&gt;"&amp;lt;?xml version=\"1.0\" encoding=\"utf-8\"?&amp;gt;" + &lt;br /&gt;"&amp;lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"&amp;gt;" + &lt;br /&gt;  GenerateAuthenticationHeader() +&lt;br /&gt;"  &amp;lt;soap:Body&amp;gt;" + &lt;br /&gt;"    &amp;lt;RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\"&amp;gt;" + &lt;br /&gt;"      &amp;lt;query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\"&amp;gt;" + &lt;br /&gt;"        &amp;lt;q1:EntityName&amp;gt;competitor&amp;lt;/q1:EntityName&amp;gt;" + &lt;br /&gt;"        &amp;lt;q1:ColumnSet xsi:type=\"q1:AllColumns\" /&amp;gt;" + &lt;br /&gt;"        &amp;lt;q1:Distinct&amp;gt;false&amp;lt;/q1:Distinct&amp;gt;" + &lt;br /&gt;"        &amp;lt;q1:LinkEntities&amp;gt;" + &lt;br /&gt;"          &amp;lt;q1:LinkEntity&amp;gt;" + &lt;br /&gt;"            &amp;lt;q1:LinkFromAttributeName&amp;gt;competitorid&amp;lt;/q1:LinkFromAttributeName&amp;gt;" + &lt;br /&gt;"            &amp;lt;q1:LinkFromEntityName&amp;gt;competitor&amp;lt;/q1:LinkFromEntityName&amp;gt;" + &lt;br /&gt;"            &amp;lt;q1:LinkToEntityName&amp;gt;opportunitycompetitors&amp;lt;/q1:LinkToEntityName&amp;gt;" + &lt;br /&gt;"            &amp;lt;q1:LinkToAttributeName&amp;gt;competitorid&amp;lt;/q1:LinkToAttributeName&amp;gt;" + &lt;br /&gt;"            &amp;lt;q1:JoinOperator&amp;gt;Inner&amp;lt;/q1:JoinOperator&amp;gt;" + &lt;br /&gt;"            &amp;lt;q1:LinkEntities&amp;gt;" + &lt;br /&gt;"              &amp;lt;q1:LinkEntity&amp;gt;" + &lt;br /&gt;"                &amp;lt;q1:LinkFromAttributeName&amp;gt;opportunityid&amp;lt;/q1:LinkFromAttributeName&amp;gt;" + &lt;br /&gt;"                &amp;lt;q1:LinkFromEntityName&amp;gt;opportunitycompetitors&amp;lt;/q1:LinkFromEntityName&amp;gt;" + &lt;br /&gt;"                &amp;lt;q1:LinkToEntityName&amp;gt;opportunity&amp;lt;/q1:LinkToEntityName&amp;gt;" + &lt;br /&gt;"                &amp;lt;q1:LinkToAttributeName&amp;gt;opportunityid&amp;lt;/q1:LinkToAttributeName&amp;gt;" + &lt;br /&gt;"                &amp;lt;q1:JoinOperator&amp;gt;Inner&amp;lt;/q1:JoinOperator&amp;gt;" + &lt;br /&gt;"                &amp;lt;q1:LinkCriteria&amp;gt;" + &lt;br /&gt;"                  &amp;lt;q1:FilterOperator&amp;gt;And&amp;lt;/q1:FilterOperator&amp;gt;" + &lt;br /&gt;"                  &amp;lt;q1:Conditions&amp;gt;" + &lt;br /&gt;"                    &amp;lt;q1:Condition&amp;gt;" + &lt;br /&gt;"                      &amp;lt;q1:AttributeName&amp;gt;opportunityid&amp;lt;/q1:AttributeName&amp;gt;" + &lt;br /&gt;"                      &amp;lt;q1:Operator&amp;gt;Equal&amp;lt;/q1:Operator&amp;gt;" + &lt;br /&gt;"                      &amp;lt;q1:Values&amp;gt;" + &lt;br /&gt;"                        &amp;lt;q1:Value xsi:type=\"xsd:string\"&amp;gt;" + sOppID + "&amp;lt;/q1:Value&amp;gt;" + &lt;br /&gt;"                      &amp;lt;/q1:Values&amp;gt;" + &lt;br /&gt;"                    &amp;lt;/q1:Condition&amp;gt;" + &lt;br /&gt;"                  &amp;lt;/q1:Conditions&amp;gt;" + &lt;br /&gt;"                &amp;lt;/q1:LinkCriteria&amp;gt;" + &lt;br /&gt;"              &amp;lt;/q1:LinkEntity&amp;gt;" + &lt;br /&gt;"            &amp;lt;/q1:LinkEntities&amp;gt;" + &lt;br /&gt;"          &amp;lt;/q1:LinkEntity&amp;gt;" + &lt;br /&gt;"        &amp;lt;/q1:LinkEntities&amp;gt;" + &lt;br /&gt;"      &amp;lt;/query&amp;gt;" + &lt;br /&gt;"    &amp;lt;/RetrieveMultiple&amp;gt;" + &lt;br /&gt;"  &amp;lt;/soap:Body&amp;gt;" + &lt;br /&gt;"&amp;lt;/soap:Envelope&amp;gt;" + &lt;br /&gt;"";&lt;br /&gt;&lt;br /&gt;var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");&lt;br /&gt;&lt;br /&gt;xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);&lt;br /&gt;xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");&lt;br /&gt;xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");&lt;br /&gt;xmlHttpRequest.setRequestHeader("Content-Length", xml.length);&lt;br /&gt;xmlHttpRequest.send(xml);&lt;br /&gt;&lt;br /&gt;var returnXML = xmlHttpRequest.responseXML;&lt;br /&gt;&lt;br /&gt;if(returnXML != null)&lt;br /&gt;{&lt;br /&gt;    var returnNodes = returnXML.selectNodes("//BusinessEntity/q1:competitorid");&lt;br /&gt;    if(returnNodes.length &amp;gt; 0)&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;       // DEFINE YOUR LOGIC HERE&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    } &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-8110670115470753982?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/8110670115470753982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=8110670115470753982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/8110670115470753982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/8110670115470753982'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/ajax-calls-using-javascript-to-retrieve.html' title='AJAX Calls using JavaScript to retrieve data for N:N relationship'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-8120724196344153258</id><published>2009-08-30T22:26:00.000-07:00</published><updated>2009-08-31T01:11:15.433-07:00</updated><title type='text'>Generic method for Ajax calls using javascript to retrieve data</title><content type='html'>//limitation – This is the generic method supported only for 1:N or N:1 relationship &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// This is a generic method for Ajax calls using javascript to retrieve data&lt;br /&gt;//****************************************************************************&lt;br /&gt;SoapRequestDynamic = function(entityName, searchColumn, searchValue, returnColumn)&lt;br /&gt;{&lt;br /&gt;  var returnPacket = "";&lt;br /&gt;  for (var i = 0; i &amp;lt; returnColumn.length; i++)&lt;br /&gt;  {&lt;br /&gt;    returnPacket += "            &amp;lt;q1:Attribute&amp;gt;" + returnColumn[i] + "&amp;lt;/q1:Attribute&amp;gt;"&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  var xml = "" +&lt;br /&gt;  "&amp;lt;?xml version=\"1.0\" encoding=\"utf-8\"?&amp;gt;" +&lt;br /&gt;  "&amp;lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"&amp;gt;" +&lt;br /&gt;  GenerateAuthenticationHeader() +&lt;br /&gt;  "  &amp;lt;soap:Body&amp;gt;" +&lt;br /&gt;  "    &amp;lt;RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\"&amp;gt;" +&lt;br /&gt;  "      &amp;lt;query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\"&amp;gt;" +&lt;br /&gt;  "        &amp;lt;q1:EntityName&amp;gt;" + entityName + "&amp;lt;/q1:EntityName&amp;gt;" +&lt;br /&gt;  "        &amp;lt;q1:ColumnSet xsi:type=\"q1:ColumnSet\"&amp;gt;" +&lt;br /&gt;  "          &amp;lt;q1:Attributes&amp;gt;" +&lt;br /&gt;  returnPacket +&lt;br /&gt;  "          &amp;lt;/q1:Attributes&amp;gt;" +&lt;br /&gt;  "        &amp;lt;/q1:ColumnSet&amp;gt;" +&lt;br /&gt;  "        &amp;lt;q1:Distinct&amp;gt;false&amp;lt;/q1:Distinct&amp;gt;" +&lt;br /&gt;  "        &amp;lt;q1:Criteria&amp;gt;" +&lt;br /&gt;  "          &amp;lt;q1:FilterOperator&amp;gt;And&amp;lt;/q1:FilterOperator&amp;gt;" +&lt;br /&gt;  "          &amp;lt;q1:Conditions&amp;gt;" +&lt;br /&gt;  "            &amp;lt;q1:Condition&amp;gt;" +&lt;br /&gt;  "              &amp;lt;q1:AttributeName&amp;gt;" + searchColumn + "&amp;lt;/q1:AttributeName&amp;gt;" +&lt;br /&gt;  "              &amp;lt;q1:Operator&amp;gt;Equal&amp;lt;/q1:Operator&amp;gt;" +&lt;br /&gt;  "              &amp;lt;q1:Values&amp;gt;" +&lt;br /&gt;  "                &amp;lt;q1:Value xsi:type=\"xsd:string\"&amp;gt;" + searchValue + "&amp;lt;/q1:Value&amp;gt;" +&lt;br /&gt;  "              &amp;lt;/q1:Values&amp;gt;" +&lt;br /&gt;  "            &amp;lt;/q1:Condition&amp;gt;" +&lt;br /&gt;  "          &amp;lt;/q1:Conditions&amp;gt;" +&lt;br /&gt;  "        &amp;lt;/q1:Criteria&amp;gt;" +&lt;br /&gt;  "      &amp;lt;/query&amp;gt;" +&lt;br /&gt;  "    &amp;lt;/RetrieveMultiple&amp;gt;" +&lt;br /&gt;  "  &amp;lt;/soap:Body&amp;gt;" +&lt;br /&gt;  "&amp;lt;/soap:Envelope&amp;gt;" +&lt;br /&gt;  "";&lt;br /&gt;&lt;br /&gt;  return xml;&lt;br /&gt;}&lt;br /&gt;// End of SoapRequestDynamic Function&lt;br /&gt;&lt;br /&gt;// Start of HttpPostRequest &lt;br /&gt;HttpPostRequest = function(xml)&lt;br /&gt;{&lt;br /&gt;  var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");&lt;br /&gt;  xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);&lt;br /&gt;  xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");&lt;br /&gt;  xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");&lt;br /&gt;  xmlHttpRequest.setRequestHeader("Content-Length", xml.length);&lt;br /&gt;  xmlHttpRequest.send(xml);&lt;br /&gt;  &lt;br /&gt;    //alert(xmlHttpRequest.responseXML.xml);&lt;br /&gt;    var resultXml = xmlHttpRequest.responseXML.selectSingleNode("//BusinessEntity");&lt;br /&gt;  &lt;br /&gt;     return resultXml;&lt;br /&gt;}&lt;br /&gt;// End of HttpPostRequest&lt;br /&gt;&lt;br /&gt;var sObjectID = crmForm.ObjectId;&lt;br /&gt;&lt;br /&gt;//Actual Call for Relationships&lt;br /&gt;/// finding out opportunity relationships&lt;br /&gt;//var buXml = HttpPostRequest(SoapRequestDynamic(entityName, searchColumn, searchValue, returnColumn));&lt;br /&gt;&lt;br /&gt;var buXml = HttpPostRequest(SoapRequestDynamic("customeropportunityrole", "opportunityid", sObjectID, ["customeropportunityroleid"]));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if(buXml != null )&lt;br /&gt;{&lt;br /&gt;    var buNodes = buXml.selectNodes("//BusinessEntity/q1:customeropportunityroleid");&lt;br /&gt;    if(buNodes.length &amp;gt; 0)&lt;br /&gt;    {&lt;br /&gt;        // DEFINE YOUR LOGIC HERE&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// for your referance &lt;br /&gt;//http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/3ec3cfcd-62ea-49b5-9239-14aee58bd7b9&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-8120724196344153258?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/8120724196344153258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=8120724196344153258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/8120724196344153258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/8120724196344153258'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/generic-method-for-ajax-calls-using.html' title='Generic method for Ajax calls using javascript to retrieve data'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-9007540588639374696</id><published>2009-08-19T23:03:00.000-07:00</published><updated>2009-08-19T23:05:05.654-07:00</updated><title type='text'>Hide navigation items of an entity in CRM</title><content type='html'>//define the entity names you want to hide&lt;br /&gt;&lt;br /&gt;NavMenuHide("Service Lines","Target Achievements","Account Plan");&lt;br /&gt;&lt;br /&gt;function NavMenuHide()&lt;br /&gt;    {&lt;br /&gt;      if (arguments == null  arguments.length == 0) return;&lt;br /&gt;      var navBar = document.getElementById("crmNavBar");&lt;br /&gt;      if (!navBar) return;&lt;br /&gt;      var optionItems =  navBar.getElementsByTagName("nobr");&lt;br /&gt;      var exitCount = 0;&lt;br /&gt;      for (opt=0; opt &lt; optionItems.length ;opt++ )&lt;br /&gt;      {&lt;br /&gt;        for (a=0; a&lt;arguments.length ;a++ )&lt;br /&gt;         {&lt;br /&gt;           if (optionItems[opt].innerText == arguments[a])&lt;br /&gt;            {&lt;br /&gt;              // --- hide the menu item&lt;br /&gt;              optionItems[opt].parentNode.style.display = "none";&lt;br /&gt;              // --- have all of the args been processed?&lt;br /&gt;              exitCount ++;&lt;br /&gt;              if (exitCount == arguments.length) return;&lt;br /&gt;             }&lt;br /&gt;          }&lt;br /&gt;       }&lt;br /&gt;     }&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-9007540588639374696?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/9007540588639374696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=9007540588639374696' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/9007540588639374696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/9007540588639374696'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/hide-navigation-items-of-entity-in-crm.html' title='Hide navigation items of an entity in CRM'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-1896793140813222826</id><published>2009-08-19T23:01:00.001-07:00</published><updated>2009-08-19T23:01:56.062-07:00</updated><title type='text'>Dynamic Picklist in CRM 4.0</title><content type='html'>var PAccountType = crmForm.all.new_picklist;&lt;br /&gt;PAccountType.originalPicklistOptions = PAccountType.Options;&lt;br /&gt;var PStartIndex =2;&lt;br /&gt;var PEndIndex =3;&lt;br /&gt;if (PStartIndex &gt; -1 &amp;amp;&amp;amp; PEndIndex &gt; -1)&lt;br /&gt;{&lt;br /&gt;// Create a new array, which will hold the new picklist options&lt;br /&gt;var PTempArray = new Array();&lt;br /&gt;&lt;br /&gt;// Initialize the index for the temp array&lt;br /&gt;var PIndex = 0;&lt;br /&gt;&lt;br /&gt;// Now loop through the original Sub-Industry options, pull out the&lt;br /&gt;// requested options a copy them into the temporary array.&lt;br /&gt;for (var i = PStartIndex; i &lt;= PEndIndex; i++)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;PTempArray[PIndex] = PAccountType.originalPicklistOptions[i];&lt;br /&gt;PIndex++;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;PAccountType.Options = PTempArray;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-1896793140813222826?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/1896793140813222826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=1896793140813222826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1896793140813222826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/1896793140813222826'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/dynamic-picklist-in-crm-40.html' title='Dynamic Picklist in CRM 4.0'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-2942414923393650962</id><published>2009-08-19T22:38:00.000-07:00</published><updated>2009-08-21T01:19:55.510-07:00</updated><title type='text'>Show the related records of an entity in a tab of the parent form</title><content type='html'>Show the related records of an entity in a tab of the parent form.&lt;br /&gt;&lt;br /&gt;“tabSet” you can find in the customization, it’s basically the relationship name.&lt;br /&gt;Or else you can run the Fiddler and get the complete URL of the related entity IFRAME (which appears in the parent form) and from the URL you can copy the “tabSet” name.&lt;br /&gt;&lt;br /&gt;crmForm.all.new_iframe_name.src =&lt;br /&gt;GetFrameSource(new_contact_new_qualification);&lt;br /&gt;&lt;br /&gt;function GetFrameSource(tabSet)&lt;br /&gt;{&lt;br /&gt;if (crmForm.ObjectId != null)&lt;br /&gt;{&lt;br /&gt;var oId = crmForm.ObjectId;&lt;br /&gt;var oType = crmForm.ObjectTypeCode;&lt;br /&gt;var security = crmFormSubmit.crmFormSubmitSecurity.value;&lt;br /&gt;return "areas.aspx?oId=" + oId + "&amp;amp;oType=" + oType + "&amp;amp;security=" +&lt;br /&gt;security + "&amp;amp;tabSet=" + tabSet;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;return "about:blank";&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-2942414923393650962?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/2942414923393650962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=2942414923393650962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2942414923393650962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2942414923393650962'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/show-related-records-of-entity-in-tab.html' title='Show the related records of an entity in a tab of the parent form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-5611935968714906727</id><published>2009-08-18T03:07:00.000-07:00</published><updated>2009-08-18T03:21:38.140-07:00</updated><title type='text'>Currency symbol in reports in case of Multi currency in MSCRM</title><content type='html'>When we develop a custom report for the MSCRM always it’s a question to show the corresponding currency symbol.  Take an example we have a report in which we are showing all the opportunity of value more than 1M (in all currencies).&lt;br /&gt;&lt;br /&gt;If you will change the currency format to any of the out of box format it will show just the dollar ($) symbol.&lt;br /&gt;&lt;br /&gt;To show the corresponding currency symbol of the opportunity, we need to select one more field in the SQL Query named “crm_moneyformatstring” from the corresponding filtered view. This field (crm_moneyformatstring) is there in every CRM entity if there is at test one currency field in the corresponding entity.&lt;br /&gt;&lt;br /&gt;And define the format of the money field by selecting “crm_moneyformatstring” field from the dataset. (right click on the box in the table/matrix, click on the properties, select format , in the format select   crm_moneyformatstring from the dataset)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-5611935968714906727?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/5611935968714906727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=5611935968714906727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5611935968714906727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/5611935968714906727'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/currency-symbol-in-reports-in-case-of.html' title='Currency symbol in reports in case of Multi currency in MSCRM'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-7900855985569344916</id><published>2009-08-18T03:01:00.000-07:00</published><updated>2009-08-18T03:06:04.333-07:00</updated><title type='text'>Microsoft Dynamics CRM Pre-Filtering</title><content type='html'>Just need to alias the filtered views with a name that starts with “CRMAF_”.   A query such as “Select name from FilteredAccount” can simply be changed to “Select name from FilteredAccount as CRMAF_Account”.  Aliasing the Filtered View with a prefix of CRMAF_ will allow CRM to recognize that you would like to enable this entity for pre-filtering.&lt;br /&gt;&lt;br /&gt;When you enable the CRM Pre-filtering functionality using the CRMAF_ method, CRM will take a query such as the following and modify it when it is uploaded into CRM:&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber FROM FilteredAccount as CRMAF_Account&lt;br /&gt;&lt;br /&gt;Becomes:&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber FROM (@P1) as CRMAF_Account&lt;br /&gt;&lt;br /&gt;Then CRM will pass a query to the P1 parameter depending on how the report is being filtered. For example: If you are running the report from the Reports area and use the Pre-filtering functionality to filter to only show Accounts that are Active, the resulting query would be something like:&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber  FROM (select FilteredAccount.* from FilteredAccount where statecode = 0) as CRMAF_Account&lt;br /&gt;&lt;br /&gt;If you are within a specific Account and run the report, the resulting query would be something like:&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber  FROM (select FilteredAccount.* from FilteredAccount where AccountId = ‘&lt;currentaccountid&gt;’) as CRMAF_Account&lt;br /&gt;&lt;br /&gt;When you are looking at a list of Accounts with 3 selected and choose the option to run the report against the selected records, the resulting query would be something like:&lt;br /&gt;&lt;br /&gt;SELECT name, accountnumber  FROM (select FilteredAccount.* from FilteredAccount where AccountId in (’&lt;1staccountid&gt;’, ‘&lt;2ndaccountid&gt;’, ‘&lt;3rdaccountid&gt;’) as CRMAF_Account&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-7900855985569344916?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/7900855985569344916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=7900855985569344916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/7900855985569344916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/7900855985569344916'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/microsoft-dynamics-crm-pre-filtering.html' title='Microsoft Dynamics CRM Pre-Filtering'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-717556861347977531</id><published>2009-08-18T02:09:00.000-07:00</published><updated>2009-08-18T02:10:50.229-07:00</updated><title type='text'>Custom Tooltips for every field on a MSCRM form</title><content type='html'>Tooltips are available on every field on a MS CRM form. The current tooltips show the text of the label but we can change the contents of the current tooltips.&lt;br /&gt;The restrictions to the tooltips are:-&lt;br /&gt;1.      Its unformatted text&lt;br /&gt;2.      And should not be more than 512 characters.&lt;br /&gt;&lt;br /&gt;The onLoad code:&lt;br /&gt;crmForm.all.new_attribute_c.title = “contents of the tooltip”&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-717556861347977531?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/717556861347977531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=717556861347977531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/717556861347977531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/717556861347977531'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/custom-tooltips-for-every-field-on.html' title='Custom Tooltips for every field on a MSCRM form'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-2779874774861018250</id><published>2009-08-18T01:52:00.000-07:00</published><updated>2009-08-18T01:56:39.266-07:00</updated><title type='text'>Capturing Previous Value OnChange of MSCRM Field</title><content type='html'>When you change the "Account Number" value, you want to populate a field called "Prior Account Number" with the previous value. The issue is that OnChange events happen AFTER the value has changed, so you can't copy the former value to the Prior Account Number field.&lt;br /&gt;&lt;br /&gt;One solution is to use another field to store the previous value. Let's call this field accounttemp. (We will need to include this field on the form so we can access it via javascript, but we can hide it by either putting it on a hidden tab or using javascript to hide the field.)&lt;br /&gt;&lt;br /&gt;Once we have our accounttemp and Prior Account Number field added to the Account form, we can add javascript to the OnChange event for the Account Number field. To make this happen we will need to make sure that the following steps happen in order:&lt;br /&gt;&lt;br /&gt;1. Value of account temp field is copied to Prior Account Number field&lt;br /&gt;2. Value of Account Number field is copied to the accounttemp field&lt;br /&gt;&lt;br /&gt;Here's how that would look in Jscript:&lt;br /&gt;crmForm.all.new_prioraccountnumber.DataValue=crmForm.all.new_accounttemp.DataValue;&lt;br /&gt;crmForm.all.new_accounttemp.DataValue = crmForm.all.accountnumber.DataValue ;&lt;br /&gt;&lt;br /&gt;The result is that the first time a value is entered into the Account Number field, the Prior Account Number field will remain blank, but the new value will be copied to the accounttemp field. The next time that the value of the Account number changes, the previous value will be copied to the Prior Account Number field.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note—this will only work if the values are entered via the form. If you import this data from Scribe or the CRM import utility, the value will not be in the accounttemp field, so the process won't work for the initial change. The workaround is that when you import your account information, import the account number to the account number field AND the accounttemp field.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-2779874774861018250?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/2779874774861018250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=2779874774861018250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2779874774861018250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2779874774861018250'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/capturing-previous-value-onchange-of.html' title='Capturing Previous Value OnChange of MSCRM Field'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-3118527469403200839</id><published>2009-08-17T05:17:00.000-07:00</published><updated>2009-10-01T01:18:38.355-07:00</updated><title type='text'>OnClick Load the CRM Page Tab - JS</title><content type='html'>document.all.tab2Tab.attachEvent('onclick', UpdateTab2);&lt;br /&gt;&lt;br /&gt;function UpdateTab2()&lt;br /&gt;{&lt;br /&gt;if(crmForm.ObjectId!=null)&lt;br /&gt;{&lt;br /&gt;var oId=crmForm.ObjectId&lt;br /&gt;crmForm.all.new_accountguid.DataValue = oId;&lt;br /&gt;if( oId != null )&lt;br /&gt;{&lt;br /&gt;oId=oId.substr(1,36) crmForm.all.IFRAME_Divisions.src=GetCrmServerUrl() + '/sfa/accts/areas.aspx?oType=1&amp;amp;security=852407&amp;amp;tabSet=new_account_new_divisions'+'&amp;amp;oId=%7b'+oId+'%7d';&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;function GetCrmServerUrl()&lt;br /&gt;{&lt;br /&gt;var CRM_URL='';&lt;br /&gt;if(AUTHENTICATION_TYPE == 0)&lt;br /&gt;{&lt;br /&gt;CRM_URL = '/' + ORG_UNIQUE_NAME;&lt;br /&gt;}&lt;br /&gt;return CRM_URL;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-3118527469403200839?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/3118527469403200839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=3118527469403200839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/3118527469403200839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/3118527469403200839'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/onclick-load-crm-page-tab-js.html' title='OnClick Load the CRM Page Tab - JS'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-56949280590982116.post-2249690095687030016</id><published>2009-08-17T05:11:00.000-07:00</published><updated>2009-10-01T00:37:56.564-07:00</updated><title type='text'>Reorder Navigation Items in MSCRM 4.0</title><content type='html'>if(document.getElementById('crmNavBar'))&lt;br /&gt;{&lt;br /&gt;//arrabge the navigation Item in order you want to display&lt;br /&gt;var oTempArray = new Array('navInfo','nav_new_account_new_accountplan','nav_new_account_new_accountserviceline','navContacts','navAddresses','navActivities', 'navActivityHistory', 'navSubAct','navRelationships','navOpps','navQuotes','navOrders','navInvoices','navService','navContracts','navListsInSFA','navCampaignsInSFA');&lt;br /&gt;var i; var iStartIndex = 0;&lt;br /&gt;// total no of navigation items defined in the oTempArray variable&lt;br /&gt;var iEndIndex = 10;&lt;br /&gt;var iEndObject = document.getElementById(oTempArray[iEndIndex]);&lt;br /&gt;for(iStartIndex; iStartIndex &lt;= iEndIndex; iStartIndex++ )&lt;br /&gt;{&lt;br /&gt;if(document.getElementById(oTempArray[iStartIndex]))&lt;br /&gt;{&lt;br /&gt;i = document.getElementById(oTempArray[iStartIndex]);&lt;br /&gt;i.parentNode.parentNode.insertBefore(i.parentNode, iEndObject.parentNode );&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/56949280590982116-2249690095687030016?l=mscrm-chandan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mscrm-chandan.blogspot.com/feeds/2249690095687030016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=56949280590982116&amp;postID=2249690095687030016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2249690095687030016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/56949280590982116/posts/default/2249690095687030016'/><link rel='alternate' type='text/html' href='http://mscrm-chandan.blogspot.com/2009/08/reorder-navigation-items-in-mscrm-40.html' title='Reorder Navigation Items in MSCRM 4.0'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/14299538502247901606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/_Bl5oYDDqp6Q/TQUkNvPL6cI/AAAAAAAAGBA/9YID50GBG7g/S220/PHOTO.jpg'/></author><thr:total>0</thr:total></entry></feed>
