<?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>Developments around Microsoft Dynamics</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/paf/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/paf/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:22:00 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Dependent Picklist (Recurrent problems)</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/dependent-picklist-recurrent-problems</link>
      <pubDate>Thu, 29 Sep 2011 02:52:00 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2011/09/29/dependent-picklist-recurrent-problems/</guid>
      <description><![CDATA[These problems are often&nbsp; related to authentication issue or configuration issue.
So please...]]></description>
      <content:encoded><![CDATA[<p>These problems are often&nbsp; related to authentication issue or configuration issue.</p>
<p>So please follow these steps : </p>
<ul>
<li>Connect to the CRM Server, then run deployment manager, select your organization and click browse from the right panel and then navigate to the Dependent Picklist link.</li>
<li>Define mapping between &laquo; case type &raquo; &amp; &laquo; priority &raquo;:</li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/7382.clip_image002_0F6A4BBA.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/7382.clip_5F00_image002_5F00_0F6A4BBA.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/1031.clip_image002_thumb_591923AA.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/1031.clip_5F00_image002_5F00_thumb_5F00_591923AA.jpg" width="326" height="261" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/8372.clip_image004_0CE119FC.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/8372.clip_5F00_image004_5F00_0CE119FC.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image004" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/7206.clip_image004_thumb_7C85A242.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/7206.clip_5F00_image004_5F00_thumb_5F00_7C85A242.jpg" width="326" height="254" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/0535.clip_image006_026045DC.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/0535.clip_5F00_image006_5F00_026045DC.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image006" border="0" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5722.clip_image006_thumb_1A177D42.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/5722.clip_5F00_image006_5F00_thumb_5F00_1A177D42.jpg" width="324" height="259" /></a></p>
<p>&nbsp;</p>
<ul>
<li>Create XML web resource </li>
<ul>
<li>Click on get script button and copy the xml</li>
<li>Create a new xml web resource</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/2514.clip_image008_4DDF7393.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/2514.clip_5F00_image008_5F00_4DDF7393.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image008" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/2514.clip_image008_thumb_24F45E8A.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/2514.clip_5F00_image008_5F00_thumb_5F00_24F45E8A.jpg" width="328" height="219" /></a></p>
<ul>
<li>Edit case form </li>
<ul>
<li>Edit case form, and click on form properties</li>
<li>Add pgs_SDK.DependentOptionSet.js script</li>
<li>Then add new function on the form load</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/6648.clip_image010_3CAB95F0.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/6648.clip_5F00_image010_5F00_3CAB95F0.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image010" border="0" alt="clip_image010" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/3034.clip_image010_thumb_177E25B7.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/3034.clip_5F00_image010_5F00_thumb_5F00_177E25B7.jpg" width="334" height="300" /></a></p>
<p>&nbsp;</p>
<ul>
<ul>
<li>Then click on the form click on &ldquo;case type&rdquo; field and add onchange event</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/3034.clip_image012_2F355D1D.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/3034.clip_5F00_image012_5F00_2F355D1D.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image012" border="0" alt="clip_image012" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/4760.clip_image012_thumb_62CDA3AE.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/4760.clip_5F00_image012_5F00_thumb_5F00_62CDA3AE.jpg" width="335" height="212" /></a></p>
<ul>
<ul>
<li>Publish customization </li>
</ul>
<li>Test</li>
</ul>
<p>Open a case (an existing one or a new one)</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/4276.clip_image014_0B4A9DCE.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/4276.clip_5F00_image014_5F00_0B4A9DCE.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image014" border="0" alt="clip_image014" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/2045.clip_image014_thumb_0135FCA3.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/2045.clip_5F00_image014_5F00_thumb_5F00_0135FCA3.jpg" width="240" height="175" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5165.clip_image016_59234D83.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/5165.clip_5F00_image016_5F00_59234D83.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image016" border="0" alt="clip_image016" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/2626.clip_image016_thumb_73EF738F.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/2626.clip_5F00_image016_5F00_thumb_5F00_73EF738F.jpg" width="240" height="159" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/0474.clip_image018_3CC5E596.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/0474.clip_5F00_image018_5F00_3CC5E596.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image018" border="0" alt="clip_image018" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/0550.clip_image018_thumb_14B33677.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/0550.clip_5F00_image018_5F00_thumb_5F00_14B33677.jpg" width="240" height="157" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to easily create dependent Picklist(Option Set) in CRM 2011 ?</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/how-to-easily-create-dependent-picklistoption-set-in-crm-2011</link>
      <pubDate>Thu, 21 Apr 2011 06:56:00 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2011/04/21/how-to-easily-create-dependent-picklistoption-set-in-crm-2011/</guid>
      <description><![CDATA[Remi Boigey, Partner Technical Consultant @ Microsoft France, did a new silverlight application in...]]></description>
      <content:encoded><![CDATA[<p>Remi Boigey, Partner Technical Consultant @ Microsoft France, did a new silverlight application in order to create Dependent Picklist by using a user friendly interface.</p>  <blockquote>   <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/1106.HomeDependentPickListCRM2011_618EE89B.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/1106.HomeDependentPickListCRM2011_5F00_618EE89B.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="HomeDependentPickListCRM2011" border="0" alt="HomeDependentPickListCRM2011" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/7043.HomeDependentPickListCRM2011_thumb_4A14346A.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/7043.HomeDependentPickListCRM2011_5F00_thumb_5F00_4A14346A.jpg" width="471" height="416" /></a></p> </blockquote>  <p><strong>Solution Features</strong></p>  <ul>   <li>It provides a generic, re-usable JScript library that can be used for any pair of option set fields. </li>    <li>It allows for a chain of dependent option set fields. Because each dependent option set field options are filtered based on the value of another field, additional option set fields options can be filtered by the option chosen in the first dependent option set field. This allows for the possibility of a set of hierarchically dependent option set fields. </li>    <li>The filtering of dependent options is set in an XML Web resource. This allows for changing the option mappings without changing the code. Editing an XML Web resource is easier for a non-developer to configure options with less opportunity to break the code. </li>    <li>The solution supports multiple languages. The filtering is based solely on the data value of the options rather than any text in the options. </li>    <li>Filtering works for any number of instances of an attribute control on the form. </li> </ul>  <p><strong>Install the solution</strong></p>  <blockquote>   <p>Step 1 : Save the CRM solution on your disk -&#160; <a title="Dependent Picklist" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/1754.DependentPickLists_1_0_0_0_managed.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/1754.DependentPickLists_5F00_1_5F00_0_5F00_0_5F00_0_5F00_managed.zip" rel="tag" target="_blank">Download here</a></p> </blockquote>  <ul>   <p>Step 2 : Import the solution – Settings / Solutions / Import</p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/7115.importsolutionCRM2011_thumb6_67262EFB.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/7115.importsolutionCRM2011_5F00_thumb6_5F00_67262EFB.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="importsolutionCRM2011_thumb6" border="0" alt="importsolutionCRM2011_thumb6" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/8015.importsolutionCRM2011_thumb6_thumb_7751F6F4.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/8015.importsolutionCRM2011_5F00_thumb6_5F00_thumb_5F00_7751F6F4.jpg" width="334" height="364" /></a></p>    <p>Click on Browse Button and select the solution <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/1754.DependentPickLists_1_0_0_0_managed.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/1754.DependentPickLists_5F00_1_5F00_0_5F00_0_5F00_0_5F00_managed.zip" target="_blank">DependentPickLists_1_0_0_0_managed.zip</a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/8468.SilverlightHierarchicalRelatedEntity_1_0_0_0_managed.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/8468.SilverlightHierarchicalRelatedEntity_5F00_1_5F00_0_5F00_0_5F00_0_5F00_managed.zip" target="_blank">.</a></p>    <p>Click on next buttons and close the form.</p>    <p>Refresh the web page.</p> </ul>  <p><strong>Test the solution</strong></p>  <p>In order to test the solution, you can use the Case entity with the two OptionSet fields: Case Type and Priority. We will filter them as displayed in the following table:</p>  <blockquote sizset="0" sizcache="1">   <table border="1" cellspacing="0" cellpadding="0"><tbody>       <tr>         <td valign="top" width="307" align="center">           <p><strong>Case Type</strong></p>         </td>          <td valign="top" width="307" align="center">           <p><strong>Priority</strong></p>         </td>       </tr>        <tr>         <td valign="top" width="307">           <p><strong>Question</strong></p>         </td>          <td valign="top" width="307">           <p>High</p>         </td>       </tr>        <tr>         <td valign="top" width="307">&nbsp;</td>          <td valign="top" width="307">           <p>Normal</p>         </td>       </tr>        <tr>         <td valign="top" width="307">&nbsp;</td>          <td valign="top" width="307">           <p>Low</p>         </td>       </tr>        <tr>         <td valign="top" width="307">&nbsp;</td>          <td valign="top" width="307">&nbsp;</td>       </tr>        <tr>         <td valign="top" width="307">           <p><strong>Problem</strong></p>         </td>          <td valign="top" width="307">           <p>High</p>         </td>       </tr>        <tr>         <td valign="top" width="307">&nbsp;</td>          <td valign="top" width="307">           <p>Normal</p>         </td>       </tr>        <tr>         <td valign="top" width="307">&nbsp;</td>          <td valign="top" width="307">&nbsp;</td>       </tr>        <tr>         <td valign="top" width="307"><strong>Request</strong></td>          <td valign="top" width="307">           <p>Normal</p>         </td>       </tr>        <tr>         <td valign="top" width="307">&nbsp;</td>          <td valign="top" width="307">           <p>Low</p>         </td>       </tr>     </tbody></table> </blockquote>  <p>When you finalized the mapping, click on ‘Get script’ button.</p>  <p>In order to use our script, you need to add a XML web ressource to the targeted entity.</p>  <p><strong>Step 1</strong></p>  <ul>   <li>Go to Settings / Customization / Customize the System / Web Ressources </li>    <li>Click on New and fill the following attributes      <ul>       <li>Name = Schema Name </li>        <li>Display Name </li>        <li>Type          <ul>           <li>Select Data XML </li>            <li>Click on ‘Text editor’ and paste your clipboard </li>         </ul>       </li>     </ul>   </li>    <li>Save the form </li> </ul>  <p><strong>Step 2</strong></p>  <ul>   <li>Go to Settings / Customization / Customize the System / Entities / Case / Forms </li>    <li>Open the Main Form </li>    <li>Click on Form properties </li>    <li>Add “gps_SDK.DepdenentOpeitonSet.js” script as available libraries </li> </ul>  <blockquote>   <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/7028.image_63C49753.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/7028.image_5F00_63C49753.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/3302.image_thumb_503737B2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/3302.image_5F00_thumb_5F00_503737B2.png" width="593" height="351" /></a></p> </blockquote>  <ul>   <li>Then, in the ‘Event Handlers’ section, add the <strong>SDK.DependentOptionSet.init</strong> function on the control Form for the event OnLoad. </li>    <li>And follow the printscreens : </li> </ul>  <blockquote>   <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/4863.form_4E866BDE.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/4863.form_5F00_4E866BDE.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="form" border="0" alt="form" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5543.form_thumb_0D0BB985.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/5543.form_5F00_thumb_5F00_0D0BB985.jpg" width="600" height="403" /></a></p> </blockquote>  <ul>   <li>Click on Add </li> </ul>  <blockquote>   <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5468.image_648CD770.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/5468.image_5F00_648CD770.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5556.image_thumb_5575F896.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/5556.image_5F00_thumb_5F00_5575F896.png" width="614" height="441" /></a></p> </blockquote>  <blockquote sizset="1" sizcache="1">   <p>- <span style="text-decoration: underline">Function</span>: <strong>SDK.DependentOptionSet.init        <br /></strong>- <span style="text-decoration: underline">Check</span> ‘Pass execution context as first parameter’</p>    <table style="width: 229px" border="1" cellspacing="0" cellpadding="2"><tbody>       <tr>         <td valign="top" width="227">‘new_Case_DependentOptionSetConfig’</td>       </tr>     </tbody></table>&#160;&#160;&#160; The parameter is the schema name of the Web ressource we just created.</blockquote>  <ul>   <li>Click on OK </li> </ul>  <blockquote>   <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/3480.image_53C52CC2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/3480.image_5F00_53C52CC2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/1830.image_thumb_1969B6E1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/1830.image_5F00_thumb_5F00_1969B6E1.png" width="611" height="410" /></a></p> </blockquote>  <ul>   <li>Save the Form. </li>    <li>Now, we have to add a function ‘<strong>SDK.DependentOptionSet.filterDependentField</strong>’ on the onchange event of the primary field (here case type) </li> </ul>  <blockquote>   <p>- Double click on the ‘Case Type&quot;’ Field</p> </blockquote>  <blockquote>   <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5554.image_0C8F60C3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/5554.image_5F00_0C8F60C3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/4786.image_thumb_3D42686E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/4786.image_5F00_thumb_5F00_3D42686E.png" width="431" height="365" /></a></p> </blockquote>  <blockquote sizset="2" sizcache="1">   <p>- Select the Events Tab</p>    <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5852.image_2DBF569F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/5852.image_5F00_2DBF569F.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/1665.image_thumb_21513376.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/1665.image_5F00_thumb_5F00_21513376.png" width="431" height="375" /></a></p>    <p>- Click on Add under the Event Handlers section</p>    <ol>     <li><span style="text-decoration: underline">Function</span>: <strong>SDK.DependentOptionSet.<strong>filterDependentField</strong></strong> </li>      <li><span style="text-decoration: underline"><strong>Don’t </strong>Check</span> ‘Pass execution context as first parameter’ </li>   </ol>    <table style="width: 229px" border="1" cellspacing="0" cellpadding="2"><tbody>       <tr>         <td valign="top" width="227">‘casetypecode’,’prioritycode’</td>       </tr>     </tbody></table> Parameters are the schema name of the option set fields..</blockquote>  <ul>   <li>Click on OK </li>    <li>Save the Form </li>    <li>Publish all customizations </li> </ul>  <blockquote>   <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5531.publish_3FBB745F.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/5531.publish_5F00_3FBB745F.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="publish" border="0" alt="publish" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/3225.publish_thumb_28ACF323.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/3225.publish_5F00_thumb_5F00_28ACF323.jpg" width="431" height="262" /></a></p> </blockquote>  <ul>   <li>Navigate to Case Form and use the picklists : Case Type and Priority </li> </ul>]]></content:encoded>
    </item>
    <item>
      <title>Microsoft Dynamics CRM 2011 – Hierarchical Treeview – Version 0.1</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/microsoft-dynamics-crm-2011-hierarchical-treeview-version-0-1</link>
      <pubDate>Fri, 25 Mar 2011 06:08:00 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2011/03/25/microsoft-dynamics-crm-2011-hierarchical-treeview-version-0-1/</guid>
      <description><![CDATA[&nbsp;
R&eacute;mi Boigey, Partner Technical Consultant @ Microsoft France, did a great Silverlight...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p>R&eacute;mi Boigey, Partner Technical Consultant @ Microsoft France, did a great Silverlight application (version 0.1) for&nbsp; Microsoft Dynamics CRM 2011 that we share you today.</p>
<p><strong>Solution Features</strong></p>
<ul>
<li>Dynamically display associated entities with the current record.</li>
<li>You can customize the display.</li>
<li>You can open records from the list</li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/6303.image_0A806224.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/6303.image_5F00_0A806224.png"><img height="360" width="513" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5722.image_thumb_6848569D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/5722.image_5F00_thumb_5F00_6848569D.png" alt="image" border="0" title="image" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p><strong>Next Features</strong> </p>
<ul>
<li>Create a user interface in order to customize the view without coding.</li>
</ul>
<p><strong>Installation </strong></p>
<p>Step 1 : Save the CRM solution on your disk -&nbsp; <a target="_blank" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/8468.SilverlightHierarchicalRelatedEntity_1_0_0_0_managed.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/8468.SilverlightHierarchicalRelatedEntity_5F00_1_5F00_0_5F00_0_5F00_0_5F00_managed.zip">SilverlightHierarchicalRelatedEntity_1_0_0_0_managed.zip</a></p>
<p>Step 2 : Import the solution &ndash; Settings / Solutions / Import</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/1682.importsolutionCRM2011_1123FB24.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/1682.importsolutionCRM2011_5F00_1123FB24.jpg"><img height="364" width="334" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/8547.importsolutionCRM2011_thumb_68A5190F.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/8547.importsolutionCRM2011_5F00_thumb_5F00_68A5190F.jpg" alt="importsolutionCRM2011" border="0" title="importsolutionCRM2011" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p>Click on Browse Button and select the solution <a target="_blank" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/8468.SilverlightHierarchicalRelatedEntity_1_0_0_0_managed.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/8468.SilverlightHierarchicalRelatedEntity_5F00_1_5F00_0_5F00_0_5F00_0_5F00_managed.zip">SilverlightHierarchicalRelatedEntity_1_0_0_0_managed.zip.</a></p>
<p>Click on next buttons and close the form.</p>
<p><strong>Test the solution </strong></p>
<p>In order to test the solution, We provide you a pre-configuration file for an account inside the solution.</p>
<p>In Settings/Customization/Customizations/Customize the System, select the account entity and edit the main Form.</p>
<p>Edit or add a new section.</p>
<p>Click on Insert tab, and then select Web resource 'Hierarchical Related Entity (Account sample).html'</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/4555.WebRessources1CRM2011_58E1225A.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/4555.WebRessources1CRM2011_5F00_58E1225A.jpg"><img height="238" width="470" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/1325.WebRessources1CRM2011_thumb_2F1DA767.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/1325.WebRessources1CRM2011_5F00_thumb_5F00_2F1DA767.jpg" alt="WebRessources1CRM2011" border="0" title="WebRessources1CRM2011" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a> <br /><br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/4087.WebRessourcesCRM2011_3AD2EE99.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/4087.WebRessourcesCRM2011_5F00_3AD2EE99.jpg"><img height="230" width="433" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/4478.WebRessourcesCRM2011_thumb_249CD347.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/4478.WebRessourcesCRM2011_5F00_thumb_5F00_249CD347.jpg" alt="WebRessourcesCRM2011" border="0" title="WebRessourcesCRM2011" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a> <br /><br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/0777.WebRessources2CRM2011_51458D20.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/0777.WebRessources2CRM2011_5F00_51458D20.jpg"><img height="173" width="416" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/2821.WebRessources2CRM2011_thumb_0FCADAC7.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-07-56-metablogapi/2821.WebRessources2CRM2011_5F00_thumb_5F00_0FCADAC7.jpg" alt="WebRessources2CRM2011" border="0" title="WebRessources2CRM2011" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p>Save and publish the account form.</p>
<p><strong>Customization</strong></p>
<p>You can reuse and customize this solution for different entities, to do this follow the following steps :</p>
<ul>
<li>Create a new HTML web resource (either in the default solution or in a custom solution)</li>
<li>Copy and paste the following code: </li>
</ul>
<table cellpadding="2" cellspacing="0" border="1" style="width: 552px;">
<tbody>
<tr>
<td width="550" valign="top">
<p>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&gt; <br />&lt;html xmlns="<a href="https://www.w3.org/1999/xhtml">https://www.w3.org/1999/xhtml</a>" &gt; <br />&lt;head&gt; <br />&lt;title&gt;Sample hierarchical Related Entity&lt;/title&gt; <br />&lt;style type="text/css"&gt; <br />html, body { <br />height: 100%; <br />overflow: auto; <br />&nbsp;&nbsp;&nbsp; }</p>
<p>body { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; padding: 0; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; margin: 0; <br />&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp; #silverlightControlHost { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height: 100%; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text-align:center; <br />&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; &lt;/style&gt; <br />&nbsp;&nbsp;&nbsp; &lt;script type="text/javascript" src="gps_scripts/Silverlight.js"&gt;&lt;/script&gt; <br />&nbsp;&nbsp;&nbsp; &lt;script type="text/javascript" src="gps_scripts/hierarchicalrelatedentity.js"&gt;&lt;/script&gt; <br />&nbsp;&nbsp;&nbsp; &lt;script type="text/javascript" src="ClientGlobalContext.js.aspx"&gt;&lt;/script&gt; <br />&nbsp;&nbsp;&nbsp; &lt;script type="text/javascript"&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var slConf = '&lt;?xml version="1.0"?&gt;' +</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;hierarchies xmlns:xsi="<a href="https://www.w3.org/2001/XMLSchema-instance&quot;">https://www.w3.org/2001/XMLSchema-instance"</a> xmlns:xsd="<a href="https://www.w3.org/2001/XMLSchema&quot;">https://www.w3.org/2001/XMLSchema"</a>&gt;' +</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;hierarchy entity="account" pk="accountid" icon="gps_imgs/ico_account.png" displayField="name"&nbsp; UrlBody="/main.aspx?etc=1" UrlBodyExtra="extraqs=id=" UrlSuffix="pagetype=entityrecord"&gt;' +</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;relatedEntity&nbsp; name="activitypointer" pluralName="Activit&eacute;s" pk="activityid" fk="regardingobjectid" displayField="subject|string,ownerid|EntityReference,scheduledstart|System.DateTime,scheduledend|System.DateTime" icon="gps_imgs/ico_activity.png" UrlBody="userdefined/edit.aspx?etc=4212" UrlBodyExtra="id=" UrlSuffix=""&nbsp; /&gt;' +</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;relatedEntity&nbsp; name="opportunity" pluralName="Opportunit&eacute;s" pk="opportunityid" fk="customerid" displayField= <br />"name|string,estimatedvalue|Money,estimatedclosedate|System.DateTime,closeprobability|int,ownerid|EntityReference" icon="gps_imgs/ico_opportunity.png"&nbsp; UrlBody="main.aspx?etn=opportunity" UrlBodyExtra="extraqs=id=" UrlSuffix="pagetype=entityrecord"&nbsp; /&gt;' +</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;relatedEntity name="contact" pluralName="Contacts" pk="contactid" fk="parentcustomerid" displayField="fullname" icon="gps_imgs/ico_contact.png"&nbsp;&nbsp; UrlBody="main.aspx?etn=contact" UrlBodyExtra="extraqs=id=" UrlSuffix="pagetype=entityrecord" /&gt;' +</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;relatedEntity&nbsp; name="account" pluralName="Sous-Comptes" pk="accountid" fk="parentaccountid" displayField="name" icon="gps_imgs/ico_subaccount.png"&nbsp; UrlBody="main.aspx?etn=account" UrlBodyExtra="extraqs=id=" UrlSuffix="pagetype=entityrecord" /&gt;' + <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;/hierarchy&gt;' + <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&lt;/hierarchies&gt;'; <br />&nbsp;&nbsp;&nbsp; &lt;/script&gt;</p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt; <br />&lt;form id="form1" runat="server" style='height:100%'&gt; <br />&lt;div id="silverlightControlHost"&gt; <br />&lt;script type="text/javascript"&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; createSLObj(silverlightControlHost); <br />&lt;/script&gt; <br />&lt;/div&gt; <br />&lt;/form&gt; <br />&lt;/body&gt; <br />&lt;/html&gt;</p>
</td>
</tr>
</tbody>
</table>
<p>The display is done in JavaScript in the variable named &ldquo;slConf&rdquo;. This variable contains data in XML.</p>
<p><b>Tags <br /></b></p>
<ul>
<li><span style="text-decoration: underline;">Hierarchy</span> :Represents the current entity</li>
</ul>
<p><b>Attributes <br /></b><b></b></p>
<ul>
<li><span style="text-decoration: underline;">entity</span> : schema name of the entity</li>
<li>pk : primary key of the entity</li>
<li><span style="text-decoration: underline;">icon</span>: url</li>
</ul>
<p>For information you can use your own pictures, for that you must import them into the CRM as a web resource.</p>
<p>If there are several attributes, you must use the separator &lsquo;|&rsquo; between type and schema name and use a comma to separate different fields</p>
<p><span style="text-decoration: underline;">Ex:</span></p>
<table cellpadding="2" cellspacing="0" border="1" style="width: 400px;">
<tbody>
<tr>
<td width="400" valign="top">displayField= <br />"name|string,estimatedvalue|Money,estimatedclosedate|System.DateTime,closeprobability|int,ownerid|EntityReference"</td>
</tr>
</tbody>
</table>
<p><span style="text-decoration: underline;">
<p>UrlBody, UrlBodyExtra ,UrlSuffix : are used to build record url </p>
</span></p>
<p><b>Tags <br /></b></p>
<ul>
<li><span style="text-decoration: underline;">relatedEntity </span>: represents an entity linked to the current record</li>
</ul>
<p><b>Attributes <br /></b><b></b></p>
<ul>
<li><span style="text-decoration: underline;">entity,pk,icon,displayField</span> : see previous definition</li>
<li><span style="text-decoration: underline;">fk</span> : foreign key</li>
<li><span style="text-decoration: underline;">pluralName</span>:</li>
</ul>
<p><span style="text-decoration: underline;">relatedEntity:</span> represents an entity linked to the current record<span style="text-decoration: underline;"> </span></p>
<p>This code samples is provided "AS IS" without warranty of any kind. <br />We appreciate any feedbacks, so feel free to contact Remi BOIGEY | <a href="mailto:remib@microsoft.com">remib@microsoft.com</a></p>
<p>PAF</p>]]></content:encoded>
    </item>
    <item>
      <title>How to easily close many CRM 4.0 activities in one shot ?</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/how-to-easily-close-many-crm-4-0-activities-in-one-shot</link>
      <pubDate>Thu, 11 Mar 2010 07:18:00 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2010/03/11/how-to-easily-close-many-crm-4-0-activities-in-one-shot/</guid>
      <description><![CDATA[This sample allows you to add a button in order to close selected activities in one shot....]]></description>
      <content:encoded><![CDATA[<P>This sample allows you to add a button in order to close selected activities <BR>in one shot.</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/Howtoeasilycloseman.0activitiesinoneshot_E564/image_2.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/Howtoeasilycloseman.0activitiesinoneshot_E564/image_2.png" mce_href="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/Howtoeasilycloseman.0activitiesinoneshot_E564/image_2.png"><IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/Howtoeasilycloseman.0activitiesinoneshot_E564/image_thumb.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/Howtoeasilycloseman.0activitiesinoneshot_E564/image_thumb.png" width=435 height=165 mce_src="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/Howtoeasilycloseman.0activitiesinoneshot_E564/image_thumb.png"></A> </P>
<P><U>Install:</U></P>
<P>- Export the ISV config file. </P>
<P>- extract the file and open it in an text editor.</P>
<P>- Update the isv config file with this source code (‘activitypointer’ section ) </P>
<P>
<TABLE border=0 cellSpacing=0 cellPadding=0 width=649 bgColor=#bfbfbf>
<TBODY>
<TR>
<TD vAlign=top width=647>
<P>&lt;ImportExportXml version="4.0.0.0" languagecode="1033" generatedBy="OnPremise"&gt;</P>
<P>&nbsp; &lt;Entities&gt;</P>
<P>&nbsp; &lt;/Entities&gt;</P>
<P>&nbsp; &lt;Roles&gt;</P>
<P>&nbsp; &lt;/Roles&gt;</P>
<P>&nbsp; &lt;Workflows&gt;</P>
<P>&nbsp; &lt;/Workflows&gt;</P>
<P>&nbsp; &lt;IsvConfig&gt;</P>
<P>&nbsp;&nbsp;&nbsp; &lt;configuration version="3.0.0000.0"&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Root&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Root&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- Microsoft Customer Relationship Management Entities (Objects) --&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Entities&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Entity name="activitypointer"&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Grid&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;MenuBar&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Buttons&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Button Icon="/_imgs/ico_18_debug.gif" JavaScript="</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var grid = document.getElementById('gridBodyTable');</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var a = document.all['crmGrid'].InnerGrid.SelectedRecords; </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var selectedItems = new Array(a.length); </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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p;&nbsp;&nbsp;&nbsp;&nbsp; stateType= 'Email';</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var xml = '' + </P>
<P>'&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&gt;' + </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&amp;lt;soap:Envelope xmlns:soap=&amp;quot;https://schemas.xmlsoap.org/soap/envelope/&amp;quot; xmlns:xsi=&amp;quot;https://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;https://www.w3.org/2001/XMLSchema&amp;quot;&gt;' + </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp; &amp;lt;soap:Header&gt;' + </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp; &amp;lt;CrmAuthenticationToken xmlns=&amp;quot;https://schemas.microsoft.com/crm/2007/WebServices&amp;quot;&gt;' + </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;lt;AuthenticationType xmlns=&amp;quot;https://schemas.microsoft.com/crm/2007/CoreTypes&amp;quot;&gt;0&amp;lt;/AuthenticationType&gt;' + </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;lt;OrganizationName xmlns=&amp;quot;https://schemas.microsoft.com/crm/2007/CoreTypes&amp;quot;&gt;Microsoft&amp;lt;/OrganizationName&gt;' + </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;lt;CallerId xmlns=&amp;quot;https://schemas.microsoft.com/crm/2007/CoreTypes&amp;quot;&gt;00000000-0000-0000-0000-000000000000&amp;lt;/CallerId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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;lt;Request xsi:type=&amp;quot;'+stateReq+'&amp;quot;&gt;' + </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;lt;EntityId&gt;' + a[i][0] + '&amp;lt;/EntityId&gt;' + </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;lt;'+stateType+'State&gt;'+state+'&amp;lt;/'+stateType+'State&gt;'+</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;lt;'+stateType+'Status&gt;' +&nbsp; status + '&amp;lt;/'+stateType+'Status&gt;'+</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&n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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlHttpRequest.Open('POST', '/mscrmservices/2007/CrmService.asmx', false);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlHttpRequest.setRequestHeader('SOAPAction','https://schemas.microsoft.com/crm/2007/WebServices/Execute');</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlHttpRequest.setRequestHeader('Content-Type', 'text/xml; charset=utf-8');</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlHttpRequest.setRequestHeader('Content-Length', xml.length);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlHttpRequest.send(xml);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;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P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ToolTips&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ToolTip LCID="1033" Text="Close Activities for selected records" /&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ToolTips&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Button&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Buttons&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/MenuBar&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Grid&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Entity&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Entities&gt;</P>
<P>&nbsp;&nbsp;&nbsp; &lt;/configuration&gt;</P>
<P>&nbsp; &lt;/IsvConfig&gt;</P>
<P>&nbsp; &lt;EntityMaps /&gt;</P>
<P>&nbsp; &lt;EntityRelationships /&gt;</P>
<P>&nbsp; &lt;Languages&gt;</P>
<P>&nbsp;&nbsp;&nbsp; &lt;Language&gt;1033&lt;/Language&gt;</P>
<P>&nbsp; &lt;/Languages&gt;</P>
<P>&lt;/ImportExportXml&gt;</P></TD></TR></TBODY></TABLE></P>
<P>-import in CRM the isv config file.</P>
<P mce_keep="true">&nbsp;</P>
<P>Pierre-Adrien FORESTIER | PAF | <A href="https://blogs.msdn.com/paf" mce_href="https://blogs.msdn.com/paf">https://blogs.msdn.com/paf</A></P>]]></content:encoded>
    </item>
    <item>
      <title>Field Level Security for Microsoft Dynamics CRM 4.0</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/field-level-security-for-microsoft-dynamics-crm-4-0</link>
      <pubDate>Mon, 08 Mar 2010 01:36:00 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2010/03/08/field-level-security-for-microsoft-dynamics-crm-4-0/</guid>
      <description><![CDATA[Here is a simple way to enable Field Level Security for Microsoft Dynamics CRM 4.0. This soluion is...]]></description>
      <content:encoded><![CDATA[<P>Here is a simple way to enable Field Level Security for Microsoft Dynamics CRM 4.0. This soluion is a ‘simple’ workaround :-) and only works on CRM Forms. the aim is to disabled fields following security roles.</P>
<P>Before:</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_2.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_2.png" mce_href="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_2.png"><IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_thumb.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_thumb.png" width=513 height=361 mce_src="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_thumb.png"></A> </P>
<P>After:</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_4.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_4.png" mce_href="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_4.png"><IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_thumb_1.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_thumb_1.png" width=515 height=329 mce_src="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/FieldLevelSecurityforMicrosoftDynamics.0_9437/image_thumb_1.png"></A> </P>
<P>Just Copy/Paste the following code on the onload event and change the 2 first lines :</P>
<TABLE border=0 cellSpacing=0 cellPadding=0 width=522 bgColor=#bfbfbf>
<TBODY>
<TR>
<TD vAlign=top width=520>
<P>var _roles = ['roleX','System Administrator']; //array of security roles name</P>
<P>var _fields = ['name', 'accountNumber']; // array of field schema names to disable </P>
<P>UpdateFields();</P>
<P>/* Functions */</P>
<P>function UpdateFields() {</P>
<P>&nbsp;&nbsp;&nbsp; var oXml = GetCurrentUserRoles();</P>
<P>&nbsp;&nbsp;&nbsp; if (oXml != null) {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var roles = oXml.selectNodes("//BusinessEntity/q1:name");</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (roles != null) {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; roles.length; i++) {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (j = 0; j &lt; _roles.length; j++) {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (roles[i].text == _roles[j]) {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (k = 0; k &lt; _fields.length; k++) {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P>&nbsp;&nbsp;&nbsp; }</P>
<P>&nbsp;&nbsp;&nbsp; return;</P>
<P>}</P>
<P>function GetCurrentUserRoles() {</P>
<P>&nbsp;&nbsp;&nbsp; var xml = "" +</P>
<P>"&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;" +</P>
<P>"&lt;soap:Envelope xmlns:soap=\"<A href="https://schemas.xmlsoap.org/soap/envelope/" mce_href="https://schemas.xmlsoap.org/soap/envelope/">https://schemas.xmlsoap.org/soap/envelope/\</A>" xmlns:xsi=\"<A href="https://www.w3.org/2001/XMLSchema-instance/" mce_href="https://www.w3.org/2001/XMLSchema-instance/">https://www.w3.org/2001/XMLSchema-instance\</A>" xmlns:xsd=\"<A href="https://www.w3.org/2001/XMLSchema/" mce_href="https://www.w3.org/2001/XMLSchema/">https://www.w3.org/2001/XMLSchema\</A>"&gt;" +</P>
<P>GenerateAuthenticationHeader() +</P>
<P>" &lt;soap:Body&gt;" +</P>
<P>" &lt;RetrieveMultiple xmlns=\"<A href="https://schemas.microsoft.com/crm/2007/WebServices/" mce_href="https://schemas.microsoft.com/crm/2007/WebServices/">https://schemas.microsoft.com/crm/2007/WebServices\</A>"&gt;" +</P>
<P>" &lt;query xmlns:q1=\"<A href="https://schemas.microsoft.com/crm/2006/Query/" mce_href="https://schemas.microsoft.com/crm/2006/Query/">https://schemas.microsoft.com/crm/2006/Query\</A>" xsi:type=\"q1:QueryExpression\"&gt;" +</P>
<P>" &lt;q1:EntityName&gt;role&lt;/q1:EntityName&gt;" +</P>
<P>" &lt;q1:ColumnSet xsi:type=\"q1:ColumnSet\"&gt;" +</P>
<P>" &lt;q1:Attributes&gt;" +</P>
<P>" &lt;q1:Attribute&gt;name&lt;/q1:Attribute&gt;" +</P>
<P>" &lt;/q1:Attributes&gt;" +</P>
<P>" &lt;/q1:ColumnSet&gt;" +</P>
<P>" &lt;q1:Distinct&gt;false&lt;/q1:Distinct&gt;" +</P>
<P>" &lt;q1:LinkEntities&gt;" +</P>
<P>" &lt;q1:LinkEntity&gt;" +</P>
<P>" &lt;q1:LinkFromAttributeName&gt;roleid&lt;/q1:LinkFromAttributeName&gt;" +</P>
<P>" &lt;q1:LinkFromEntityName&gt;role&lt;/q1:LinkFromEntityName&gt;" +</P>
<P>" &lt;q1:LinkToEntityName&gt;systemuserroles&lt;/q1:LinkToEntityName&gt;" +</P>
<P>" &lt;q1:LinkToAttributeName&gt;roleid&lt;/q1:LinkToAttributeName&gt;" +</P>
<P>" &lt;q1:JoinOperator&gt;Inner&lt;/q1:JoinOperator&gt;" +</P>
<P>" &lt;q1:LinkEntities&gt;" +</P>
<P>" &lt;q1:LinkEntity&gt;" +</P>
<P>" &lt;q1:LinkFromAttributeName&gt;systemuserid&lt;/q1:LinkFromAttributeName&gt;" +</P>
<P>" &lt;q1:LinkFromEntityName&gt;systemuserroles&lt;/q1:LinkFromEntityName&gt;" +</P>
<P>" &lt;q1:LinkToEntityName&gt;systemuser&lt;/q1:LinkToEntityName&gt;" +</P>
<P>" &lt;q1:LinkToAttributeName&gt;systemuserid&lt;/q1:LinkToAttributeName&gt;" +</P>
<P>" &lt;q1:JoinOperator&gt;Inner&lt;/q1:JoinOperator&gt;" +</P>
<P>" &lt;q1:LinkCriteria&gt;" +</P>
<P>" &lt;q1:FilterOperator&gt;And&lt;/q1:FilterOperator&gt;" +</P>
<P>" &lt;q1:Conditions&gt;" +</P>
<P>" &lt;q1:Condition&gt;" +</P>
<P>" &lt;q1:AttributeName&gt;systemuserid&lt;/q1:AttributeName&gt;" +</P>
<P>" &lt;q1:Operator&gt;EqualUserId&lt;/q1:Operator&gt;" +</P>
<P>" &lt;/q1:Condition&gt;" +</P>
<P>" &lt;/q1:Conditions&gt;" +</P>
<P>" &lt;/q1:LinkCriteria&gt;" +</P>
<P>" &lt;/q1:LinkEntity&gt;" +</P>
<P>" &lt;/q1:LinkEntities&gt;" +</P>
<P>" &lt;/q1:LinkEntity&gt;" +</P>
<P>" &lt;/q1:LinkEntities&gt;" +</P>
<P>" &lt;/query&gt;" +</P>
<P>" &lt;/RetrieveMultiple&gt;" +</P>
<P>" &lt;/soap:Body&gt;" +</P>
<P>"&lt;/soap:Envelope&gt;" +</P>
<P>"";</P>
<P>&nbsp;&nbsp;&nbsp; var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");</P>
<P>&nbsp;&nbsp;&nbsp; xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);</P>
<P>&nbsp;&nbsp;&nbsp; xmlHttpRequest.setRequestHeader("SOAPAction", " <A href="https://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple" mce_href="https://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple">https://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple</A>");</P>
<P>&nbsp;&nbsp;&nbsp; xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");</P>
<P>&nbsp;&nbsp;&nbsp; xmlHttpRequest.setRequestHeader("Content-Length", xml.length);</P>
<P>&nbsp;&nbsp;&nbsp; xmlHttpRequest.send(xml);</P>
<P>&nbsp;&nbsp;&nbsp; var resultXml = xmlHttpRequest.responseXML;</P>
<P>&nbsp;&nbsp;&nbsp; return (resultXml);</P>
<P>}</P>
<P>/* Functions */</P></TD></TR></TBODY></TABLE>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P>Pierre-Adrien FORESTIER | PAF | <A href="https://blogs.msdn.com/paf" mce_href="https://blogs.msdn.com/paf">https://blogs.msdn.com/paf</A></P>]]></content:encoded>
    </item>
    <item>
      <title>Mobile Express for Microsoft Dynamics CRM 4.0 is available</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/mobile-express-for-microsoft-dynamics-crm-4-0-is-available</link>
      <pubDate>Fri, 07 Aug 2009 03:08:58 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2009/08/07/mobile-express-for-microsoft-dynamics-crm-4-0-is-available/</guid>
      <description><![CDATA[&#160;  Mobile Express for Microsoft Dynamics CRM 4.0 is available as a free download. It supports...]]></description>
      <content:encoded><![CDATA[<h4>&#160;</h4>  <p>Mobile Express for Microsoft Dynamics CRM 4.0 is available as a free download. It supports all the customization and the multi-tenant capabilities of Microsoft Dynamics CRM 4.0. Customization tools are embedded within Mobile Express for Microsoft Dynamics CRM 4.0, and it uses the same user roles that you already have to provide a role-based experience on the device.</p>  <p><a title="https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=f592ec6c-f412-4fd5-9a80-cd3bcbd26d8b#tm" href="https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=f592ec6c-f412-4fd5-9a80-cd3bcbd26d8b#tm">https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=f592ec6c-f412-4fd5-9a80-cd3bcbd26d8b#tm</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Update Rollup 5 for Microsoft Dynamics CRM 4.0</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/update-rollup-5-for-microsoft-dynamics-crm-4-0</link>
      <pubDate>Fri, 03 Jul 2009 04:06:07 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2009/07/03/update-rollup-5-for-microsoft-dynamics-crm-4-0/</guid>
      <description><![CDATA[Download it here :...]]></description>
      <content:encoded><![CDATA[<p>Download it here : </p>  <p><a title="https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=5101d801-976b-4c11-bdfc-000b970ef4a3" href="https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=5101d801-976b-4c11-bdfc-000b970ef4a3">https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=5101d801-976b-4c11-bdfc-000b970ef4a3</a></p>  <p>Microsoft Dynamics CRM 4.0 updates and hotfixes :</p>  <p><a href="https://support.microsoft.com/kb/949256/en-us">https://support.microsoft.com/kb/949256/en-us</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Update Rollup 4 for Microsoft Dynamics CRM 4.0</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/update-rollup-4-for-microsoft-dynamics-crm-4-0</link>
      <pubDate>Mon, 11 May 2009 12:29:57 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2009/05/11/update-rollup-4-for-microsoft-dynamics-crm-4-0/</guid>
      <description><![CDATA[Download it here :...]]></description>
      <content:encoded><![CDATA[<p>Download it here : </p>  <p><a title="https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=0ddf8e83-5d9c-4fe7-9ae6-f2713a024071" href="https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=0ddf8e83-5d9c-4fe7-9ae6-f2713a024071">https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=0ddf8e83-5d9c-4fe7-9ae6-f2713a024071</a></p>  <p>Microsoft Dynamics CRM 4.0 updates and hotfixes :</p>  <p><a href="https://support.microsoft.com/kb/949256/en-us">https://support.microsoft.com/kb/949256/en-us</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to display related entity field in a CRM Lookup instead of the primary entity field?</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/how-to-display-related-entity-field-in-a-crm-lookup-instead-of-the-primary-entity-field</link>
      <pubDate>Wed, 22 Apr 2009 02:17:00 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2009/04/22/how-to-display-related-entity-field-in-a-crm-lookup-instead-of-the-primary-entity-field/</guid>
      <description><![CDATA[Overview
As you all know a CRM lookup only displays its related entity primary field. Although this...]]></description>
      <content:encoded><![CDATA[<H2>Overview</H2>
<P>As you all know a CRM lookup only displays its related entity primary field. Although this can not be changed using existing customizations; in most cases that suffices. </P>
<P>However, there are occasions where you want to display another information in order to avoid opening the related entity form. </P>
<P>So I created a generic JavaScript function to display another attibute inside CRM lookup. </P>
<H2>Sample </H2>
<P mce_keep="true">&nbsp;</P>
<P>On a contact form you want to display the accountnumber field, inside the parent customer lookup, instead of primary field of the account entity.</P>
<P><U><STRONG>Before:</STRONG></U></P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_6.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_6.png" mce_href="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_6.png"><IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_thumb_2.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_thumb_2.png" width=523 height=181 mce_src="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_thumb_2.png"></A> </P>
<P><U><STRONG>After:</STRONG></U></P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_16.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_16.png" mce_href="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_16.png"><IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_thumb_7.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_thumb_7.png" width=524 height=179 mce_src="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/HowtodisplayrelatedentityfieldsinaCRMLoo_9DEC/image_thumb_7.png"></A>&nbsp;</P>
<H2>Step 1 </H2>
<P>Go on the form where the lookup is displayed:</P>
<P>On the <U>onload event</U>, add this line of code and change LookupSchemaName by the schema name of your lookup.</P>
<TABLE border=0 cellSpacing=0 cellPadding=0 bgColor=#bfbfbf>
<TBODY>
<TR>
<TD vAlign=top width=585>
<P>crmForm.all.LookupSchemaName.FireOnChange();</P></TD></TR></TBODY></TABLE>
<H2>Step 2</H2>
<P>On the <U>onchange event </U>of the lookup, Copy the following code (inside the table): </P>
<UL>
<LI>fieldToDisplay = the name of the attribute that you want to display in the lookup. Take the schema name of the attribute in the linked entity. <BR></LI>
<LI>fieldToDisplayIsText: 
<UL>
<LI><U>true</U> if you want to display a nvarchar field. </LI>
<LI><U>false</U> if you want to display a picklist or a lookup field. <BR></LI></UL></LI>
<LI>organizationName = name of your organization (without spaces). </LI></UL>
<TABLE border=0 cellSpacing=0 cellPadding=0 bgColor=#bfbfbf>
<TBODY>
<TR>
<TD vAlign=top width=585>
<P>var fieldToDisplay = 'accountnumber'; <BR>var fieldToDisplayIsText = true; <BR>var organizationName = 'MyOrganizationName'; </P>
<P>var lookupData = new Array(); <BR>var lookupItem= new Object(); <BR>var lookup = event.srcElement.DataValue; </P>
<P>if (typeof(lookup) != 'undefined' &amp;&amp; lookup != null &amp;&amp; lookup[0] != null) <BR>{ <BR>var myValue = GetAttributeValueFromID(lookup[0].typename,lookup[0].id,fieldToDisplay,fieldToDisplayIsText); </P>
<P>if(myValue != '') <BR>{ </P>
<P>&nbsp; lookupItem.id = lookup[0].id; <BR>&nbsp;&nbsp; lookupItem.typename = lookup[0].typename; <BR>&nbsp;&nbsp; lookupItem.name = myValue; <BR>&nbsp;&nbsp; lookupData[0] = lookupItem;&nbsp; <BR>&nbsp;&nbsp; crmForm.all[event.srcElement.id].DataValue = lookupData; <BR>} </P>
<P>} </P>
<P>function GetAttributeValueFromID(sEntityName, sGUID, sAttributeName, isTextField) <BR>{ <BR>var xml = "" + </P>
<P>"&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;" + </P>
<P>"&lt;soap:Envelope xmlns:soap=\"<A href="https://schemas.xmlsoap.org/soap/envelope//%22" mce_href="https://schemas.xmlsoap.org/soap/envelope/\" ?="?">https://schemas.xmlsoap.org/soap/envelope/\"</A> xmlns:xsi=\"<A href="https://www.w3.org/2001/XMLSchema-instance/%22" mce_href="https://www.w3.org/2001/XMLSchema-instance\" ?="?">https://www.w3.org/2001/XMLSchema-instance\"</A> xmlns:xsd=\"<A href="https://www.w3.org/2001/XMLSchema/%22" mce_href="https://www.w3.org/2001/XMLSchema\" ?="?">https://www.w3.org/2001/XMLSchema\"</A>&gt;" + </P>
<P>GenerateAuthenticationHeader() + </P>
<P>"&nbsp; &lt;soap:Body&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp; &lt;Execute xmlns=\"<A href="https://schemas.microsoft.com/crm/2007/WebServices/%22" mce_href="https://schemas.microsoft.com/crm/2007/WebServices\" ?="?">https://schemas.microsoft.com/crm/2007/WebServices\"</A>&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Request xsi:type=\"RetrieveRequest\" ReturnDynamicEntities=\"false\"&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Target xsi:type=\"TargetRetrieveDynamic\"&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;EntityName&gt;" + sEntityName + "&lt;/EntityName&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;EntityId&gt;" + sGUID + "&lt;/EntityId&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Target&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ColumnSet xmlns:q1=\"<A href="https://schemas.microsoft.com/crm/2006/Query/%22" mce_href="https://schemas.microsoft.com/crm/2006/Query\" ?="?">https://schemas.microsoft.com/crm/2006/Query\"</A> xsi:type=\"q1:ColumnSet\"&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;q1:Attributes&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;q1:Attribute&gt;" + sAttributeName + "&lt;/q1:Attribute&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/q1:Attributes&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ColumnSet&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Request&gt;" + </P>
<P>"&nbsp;&nbsp;&nbsp; &lt;/Execute&gt;" + </P>
<P>"&nbsp; &lt;/soap:Body&gt;" + </P>
<P>"&lt;/soap:Envelope&gt;" + </P>
<P>""; </P>
<P>var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP"); </P>
<P>xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); </P>
<P>xmlHttpRequest.setRequestHeader("SOAPAction","<A href="https://schemas.microsoft.com/crm/2007/WebServices/Execute%22);" mce_href="https://schemas.microsoft.com/crm/2007/WebServices/Execute" );?=");?">https://schemas.microsoft.com/crm/2007/WebServices/Execute");</A></P>
<P>xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); </P>
<P>xmlHttpRequest.setRequestHeader("Content-Length", xml.length); </P>
<P>xmlHttpRequest.send(xml); </P>
<P>var result = null; </P>
<P>if(isTextField){ </P>
<P>result = xmlHttpRequest.responseXML.selectSingleNode("//q1:" + sAttributeName).text; </P>
<P>} </P>
<P>else </P>
<P>{ </P>
<P>result = xmlHttpRequest.responseXML.selectSingleNode("//q1:" + sAttributeName).getAttribute('name'); </P>
<P>} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (result == null) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ''; <BR>} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return result; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P></TD></TR></TBODY></TABLE>
<H2>Step 3</H2>
<P>Save and publish the entity</P>
<H3>&nbsp;</H3>
<H3>PAF</H3>]]></content:encoded>
    </item>
    <item>
      <title>CRM 4.0 doesn’t provide a 360 view, so we did it for you :-) – Version 0.9</title>
      <link>https://docs.microsoft.com/archive/blogs/paf/crm-4-0-doesnt-provide-a-360-view-so-we-did-it-for-you-version-0-9</link>
      <pubDate>Wed, 08 Apr 2009 02:13:00 GMT</pubDate>
      <dc:creator><![CDATA[Pierre-Adrien]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/paf/2009/04/08/crm-4-0-doesnt-provide-a-360-view-so-we-did-it-for-you-version-0-9/</guid>
      <description><![CDATA[Here you’ll find our free Relationship Explorer/Charting for Microsoft Dynamics CRM 4.0.  Too many...]]></description>
      <content:encoded><![CDATA[<p>Here you’ll find our free Relationship Explorer/Charting for Microsoft Dynamics CRM 4.0.</p>  <p>Too many people were asking us this feature, so now we’re proud to share this first version.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/0250856517cf_9D1A/image_5.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/0250856517cf_9D1A/image_5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/0250856517cf_9D1A/image_thumb.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/0250856517cf_9D1A/image_thumb.png" width="537" height="275" /></a> </p>  <p>Download it here <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/0005.crmtreeview32.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/0005.crmtreeview32.zip" target="_blank">Version 32bits</a>     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/8816.crmtreeview64.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/8816.crmtreeview64.zip" target="_blank">Version 64 bits</a>     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/07/56/metablogapi/5367.TreeViewStructure.docx" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-07-56-metablogapi/5367.TreeViewStructure.docx" target="_blank">Configuration Document</a></p>  <p><u>Requirement</u> : </p>  <blockquote>   <p>- .NET 3.5 Framework installed      <br />- Microsoft Dynamics CRM 4.0</p> </blockquote>  <h3>Step 1 : Installation </h3>  <p>Follow this video:</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:2b834b3a-5d2e-4934-9eb8-d35092a3d330" class="wlWriterSmartContent">   <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="8b6514d2-b859-4acb-8b5c-58ca17d36af1">     <div><a href="https://www.youtube.com/watch?v=toVk7XHRfZE&amp;feature=youtube_gdata" target="_new"><img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" onload="var downlevelDiv = document.getElementById(&#39;8b6514d2-b859-4acb-8b5c-58ca17d36af1&#39;); downlevelDiv.innerHTML = &quot;&lt;div&gt;&lt;object width=\&quot;513\&quot; height=\&quot;384\&quot;&gt;&lt;param name=\&quot;movie\&quot; value=\&quot;https://www.youtube.com/v/toVk7XHRfZE&amp;hl=en\&quot;&gt;&lt;\/param&gt;&lt;embed src=\&quot;https://www.youtube.com/v/toVk7XHRfZE&amp;hl=en\&quot; type=\&quot;application/x-shockwave-flash\&quot; width=\&quot;513\&quot; height=\&quot;384\&quot;&gt;&lt;\/embed&gt;&lt;\/object&gt;&lt;\/div&gt;&quot;;" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/CRM4.0doesntprovidea360viewsowediditfo.9_9EBE/videoac09e4076d57.jpg" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/CRM4.0doesntprovidea360viewsowediditfo.9_9EBE/videoac09e4076d57.jpg" galleryimg="no" /></a></div>   </div> </div>  <p><u><strong>In site map :</strong></u></p>  <p>To add a link in the site map, add this snippet in the site map xml file.</p>  <table border="0" cellspacing="0" cellpadding="2" width="400"><tbody>     <tr>       <td valign="top" width="400">&lt;Group Id=&quot;Addons&quot; Title=&quot;Addons&quot;&gt;          <br />&#160; &lt;SubArea Id=&quot;nav_treeview&quot; Title=&quot;Vue d'ensemble&quot; Icon=&quot;/_imgs/area/18_calendar.gif&quot;&#160;&#160;&#160; Url=&quot;/ISV/HierarchicalView/hierarchie.aspx?file=*******.xml&quot; Client=&quot;Web&quot; PassParams=&quot;1&quot; /&gt;           <br />&lt;/Group&gt;</td>     </tr>   </tbody></table>  <p>The PassParams attribute must be set to 1.    <br />Replace ‘*******’&#160; by the file name to use as configuration file.</p>  <p>Video show you how to display the 360 view in the CRM site map but you can display it in any entity form by adding an Iframe.</p>  <p><u><strong>Iframe properties:</strong></u></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/0250856517cf_9D1A/image_4.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/0250856517cf_9D1A/image_4.png" mce_href="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/0250856517cf_9D1A/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/paf/WindowsLiveWriter/0250856517cf_9D1A/image_thumb_1.png" original-url="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/0250856517cf_9D1A/image_thumb_1.png" width="457" height="467" mce_src="https://blogs.msdn.com/blogfiles/paf/WindowsLiveWriter/0250856517cf_9D1A/image_thumb_1.png" /></a> </p>  <p>Don’t forget to check “Pass record object-type code and unique identifier as parameters” and uncheck “Restrict cross-frame scripting”.    <br />Replace schemaname.xml in the url by your configuration file name.</p>  <h3>Step 2: Configuration</h3>  <p>If you want to create multiple tree structures, you can create and define a new xml file for each structure. To specify which structure you want to display, you must add “file” parameter in the URL. For example: </p>  <p>* /ISV/HierarchicalView/hierarchie.aspx?file=account.xml</p>  <p>All structure xml file must be in ISV/HierarchicalView folder. We provide you a document explaining you how to write your own xml file.</p>  <p>In the project package, there is a xsd file which define the xml structure of the configuration file.</p>]]></content:encoded>
    </item>
  </channel>
</rss>