<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Mudit Agarwal</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mudit_agarwal/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mudit_agarwal/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 04:08:24 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Filtering in Sub-grids CRM 2015 | CRM online</title>
      <link>https://docs.microsoft.com/archive/blogs/mudit_agarwal/filtering-in-sub-grids-crm-2015-crm-online</link>
      <pubDate>Sun, 06 Sep 2015 21:15:12 GMT</pubDate>
      <dc:creator><![CDATA[Mudit Agarwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mudit_agarwal/2015/09/06/filtering-in-sub-grids-crm-2015-crm-online/</guid>
      <description><![CDATA[Filter Sub-grid in CRM 2015
Contextual filtering in sub grids is a very common requirement, which...]]></description>
      <content:encoded><![CDATA[<h1>Filter Sub-grid in CRM 2015</h1>
<p>Contextual filtering in sub grids is a very common requirement, which is not supported out of the box in CRM. People use unsupported JavaScript which works till January update 1 and for spring release it stopped working. But if we understand why it will not work in spring release, because of new form structure and change DOM, document.getElementById stopped working.</p>
<h2>JavaScript method which will work in January Update and Spring release&nbsp;</h2>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>function<br />&nbsp; getElement(elementName) {</p>
<p>&nbsp;&nbsp;&nbsp; if<br />&nbsp; (document.getElementById(elementName) == null || document.getElementById(elementName) == 'undefined') {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return<br />&nbsp; window.parent.document.getElementById(elementName);</p>
<p>&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; else {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return document.getElementById(elementName);</p>
<p>&nbsp;&nbsp;&nbsp; }</p>
<p>}</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The above function will return the object in both January Update 1 and Spring release. Now any sub grid can be filtered in January Update 1 and spring release both. Here is the method:</p>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>function<br />&nbsp; LoadGridForRollupView(subGridName, filterFetchXml) {</p>
<p>&nbsp;&nbsp;&nbsp; var subGrid =<br />&nbsp; getElement(subGridName);</p>
<p>&nbsp;&nbsp;&nbsp; //If this method is called from the form OnLoad, make<br />&nbsp; sure that the grid is loaded before proceeding&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; if (subGrid == null ||<br />&nbsp; subGrid.control == null || subGrid.control == 'undefined') {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //The subgrid hasn't loaded, wait 100 mili second and<br />&nbsp; then try again</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp; setTimeout('LoadGridForRollupView(\'' + subGridName + '\',\'' + filterFetchXml + '\')', 100);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</p>
<p>&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; //Update the fetchXML that will be used by the grid.</p>
<p>&nbsp;&nbsp;&nbsp; var FetchXml = filterFetchXml;</p>
<p>&nbsp;&nbsp;&nbsp; //Inject the new fetchXml</p>
<p>&nbsp;&nbsp;&nbsp;<br />&nbsp; subGrid.control.SetParameter("fetchXml", FetchXml);</p>
<p>&nbsp;&nbsp;&nbsp;<br />&nbsp; subGrid.control.SetParameter("effectiveFetchXml", FetchXml);</p>
<p>&nbsp;&nbsp;&nbsp;<br />&nbsp; subGrid.control.SetParameter("fetchXmlForFilters", FetchXml);</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; //Force the subgrid to refresh</p>
<p>&nbsp;&nbsp;&nbsp;<br />&nbsp; subGrid.control.refresh();</p>
<p>&nbsp;&nbsp;&nbsp; setTimeout('RefreshSubGrid(\'' +<br />&nbsp; subGridName + '\')', 500);</p>
<p>}</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>But again this method is unsupported and it might stop working in subsequent releases of dynamics CRM online. This has been tested on Chrome and IE for CRM online for January Update 1 and spring release both.</p>
<p>&nbsp;</p>
<p>Happy programming in Dynamics CRM online</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>CRM 2013 Online to CRM 2015 Online Upgrade Findings</title>
      <link>https://docs.microsoft.com/archive/blogs/mudit_agarwal/crm-2013-online-to-crm-2015-online-upgrade-findings</link>
      <pubDate>Wed, 04 Feb 2015 05:31:00 GMT</pubDate>
      <dc:creator><![CDATA[Mudit Agarwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mudit_agarwal/2015/02/04/crm-2013-online-to-crm-2015-online-upgrade-findings/</guid>
      <description><![CDATA[Findings
&nbsp;
Issue &ndash; Workflow with Email Messages havingRecord Dynamic URL

If...]]></description>
      <content:encoded><![CDATA[<h1>Findings</h1>
<p>&nbsp;</p>
<h2>Issue &ndash; Workflow with Email Messages having<br />Record Dynamic URL</h2>
<ul>
<li><br />If Workflows contains send email functionality and there are dynamic Record URLs, such solution doesn&rsquo;t get imported from CRM 2013 to CRM 2015 directly because there are no metadata attribute information available for Record Dynamic URL attribute and it will fail the importing solution, although organization import will work but that will cause such workflows in draft mode.</li>
</ul>
<h2>How to Trace</h2>
<p>To Trace such issue, download the solution having all the Processes in CRM 2013 and extract the zip file, open the workflows folder, rename all the xaml file as xml by a simple console command</p>
<p><em>Rename *.xaml *.xml</em></p>
<p>Open all these xml files in a Visual Studio Solution and use short cut ctrl + shift + F to find in all files. Search for &ldquo;!Process_Custom_Attribute_URL_&rdquo;</p>
<p>This attribute will show all the files and locations where Record Dynamic URL has been used</p>
<h2>Workaround/Resolution</h2>
<ul>
<li><br />To resolve this, once you get all the workflows, open them individually in CRM 2013, deactivate them, remove the Record Dynamic URL property from Email body and then save and Activate the workflows</li>
<li><br />Publish the solution and then export it, it should get easily updated in CRM 2015 now</li>
<li><br />Once imported, open all those workflows, deactivate them and then add the Record Dynamic URL back again in the Email body</li>
<li><br />Activate the workflows and publish the solution&nbsp;</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Issue &ndash; JavaScript Removed Methods</h2>
<p>Removed methods are either obsolete or replaced with other methods. You should make sure these methods aren&rsquo;t used in your scripts. The following methods were deprecated with earlier versions of Microsoft Dynamics CRM and are no longer present in the current version:</p>
<p><strong><span style="text-decoration: underline;">getAuthenticationHeader </span></strong></p>
<p>This method supported use of the Microsoft Dynamics CRM 4.0 web services, which no longer exist.</p>
<p><span style="text-decoration: underline;"><strong>getServerUrl </strong></span></p>
<p>This method was replaced by getClientUrl</p>
<p><span style="text-decoration: underline;"><strong>isOutlookClient </strong></span></p>
<p>This method was replaced by client.getClient</p>
<p><strong><span style="text-decoration: underline;">isOutlookOnline </span></strong></p>
<p>This method was replaced by client.getClientState</p>
<p>&nbsp;</p>
<h2>How to Trace</h2>
<p>To trace JavaScript removed methods, download the solution having all the web resources and after extracting all the web resources search for all above mentioned 4 methods.</p>
<h2>Resolution</h2>
<p>Before doing actual upgrade, replace above methods with appropriate methods</p>
<p>&nbsp;</p>
<p>This article is an ongoing article, and I will keep on updating as in when I get the information.</p>
<p>&nbsp;</p>
<h2>Issue &ndash; Security Tab missing after Upgrade</h2>
<p>Previous CRM 2013 solutions doesn't have Users and Roles under Security tab, while in CRM 2015 they are moved under Security tab. this tab will get missed if site map is edited in CRM 2013 and then solution gets imported to CRM 2015.</p>
<p>&nbsp;</p>
<h2>Resolution</h2>
<p>Copy the sitemap from CRM 2015 new organization and get the security tab back in CRM 2015 after upgrade</p>]]></content:encoded>
    </item>
    <item>
      <title>CRM 2013 Solution Import fails when you have Quick View Forms in the solution</title>
      <link>https://docs.microsoft.com/archive/blogs/mudit_agarwal/crm-2013-solution-import-fails-when-you-have-quick-view-forms-in-the-solution</link>
      <pubDate>Mon, 27 Oct 2014 17:16:52 GMT</pubDate>
      <dc:creator><![CDATA[Mudit Agarwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mudit_agarwal/2014/10/27/crm-2013-solution-import-fails-when-you-have-quick-view-forms-in-the-solution/</guid>
      <description><![CDATA[CRM 2013 Solution Import with Quick View Forms
A scenario when you are trying to import a solution...]]></description>
      <content:encoded><![CDATA[<p><span style="text-decoration: underline;"><strong><span style="font-size: large;">CRM 2013 Solution Import with Quick View Forms</span></strong></span></p>
<p>A scenario when you are trying to import a solution where you have created a quick view form and trying to consume the same in some other entity's form. If that entity appears before the entity for which you have created the quick view form. For example:</p>
<ul>
<li>If there is Account entity quick view form which you have newly created and used on Contact entity as part of same solution. When you try to import that solution it will give you error that Form with Id '&lt;GUID&gt;' does not exist. Unfortunately there is no direct solution to this problem. if your quick view form's entity customizations come on the top of entity's customizations of entity on which you have consumed that Quick View Form, it will not create any problem. To Solve this problem you can nail it down in two ways, either create two different solutions and import the solution having quick view form first. The other solution could be to edit the customization.xml and move the whole entity node having "Quick View form" on top of entity consuming that form, save it. Zip and make your solution file to make it work. Note: This is not a suggested solution as this is unsupported but can be used as a workaround.</li>
</ul>]]></content:encoded>
    </item>
  </channel>
</rss>