﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>c360 Forums / SDK for Microsoft CRM / Version 3 Product Questions / Samples  / Multiple Lookups / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>c360 Forums</description><link>http://www.c360.com/Forums/</link><webMaster>support@c360.com</webMaster><lastBuildDate>Sat, 22 Nov 2008 13:36:34 GMT</lastBuildDate><ttl>20</ttl><item><title>Multiple Lookups</title><link>http://www.c360.com/Forums/Topic785-39-1.aspx</link><description>This sample is &lt;A href="http://www.c360.com/Forums/Topic709-8-1.aspx"&gt;based on a suggestion by John Marx&lt;/A&gt;.&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;FONT size=3&gt;Overview&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The goal of this sample is to demonstrate how you can have multiple lookup controls on one page and make the second control dependant on the value selected in the first control and make the third controls dependant on the value selected in the second control. Initially, only the first control is enabled, but when you select a record the second control becomes available and the third control becomes available when you make a selection in the second one. In this sample, the user will be prompted to select a territory. When he makes his selection, he will be able to select only accounts in this territory and when he selects an account, he will be able to select contacts who are linked to this account. This sample demonstrates the following: Use three Lookup controls to allow searching for Territory, Account and Contact Client-side event handler to execute code when a value is selected in a lookup control. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;FONT size=3&gt;Installation&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Step 1&lt;/U&gt;&lt;/STRONG&gt; – Edit ISV.config&lt;/P&gt;&lt;P&gt;This sample must be added as a new link under a “top level” menu (i.e.: a pull down menu on the top menu bar at the top of the main CRM window). Therefore we need to edit the “CustomMenus” section in Microsoft CRM’s ISV.config file like so:&lt;BR&gt;&amp;lt;Menu Title="Testing c360 SDK"&amp;gt;&lt;BR&gt; &amp;lt;MenuItem Title="Multiple Lookups" Url="&lt;A href="http://localhost:5517/c360Sdk/Samples/MultipleLookups/MultipleLoookups.aspx"&gt;http://localhost:5517/c360Sdk/Samples/MultipleLookups/MultipleLoookups.aspx&lt;/A&gt;" WinMode="0" Client="Web,OutlookWorkstationClient" AvailableOffline="false" /&amp;gt;&lt;BR&gt;&amp;lt;/Menu&amp;gt;&lt;/P&gt;&lt;P&gt;Note: you will need to adjust the url in the above sample to match your environment.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Step 2&lt;/U&gt;&lt;/STRONG&gt; – Copy files&lt;/P&gt;&lt;P&gt;In your Visual Studio 2005 project, make sure you have a folder called “Samples” and create a sub-folder called “MultipleLookups”.&lt;/P&gt;&lt;P&gt;Copy the ASPX page and its corresponding code behind file:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MultipleLookups.aspx&lt;/LI&gt;&lt;LI&gt;MultipleLookups.aspx.cs&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;FONT size=3&gt;Screenshots&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.c360.com/Forums/Uploads/Images/4e034cc6-f670-498b-a343-0003.PNG"&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.c360.com/Forums/Uploads/Images/b5dfb8d4-237a-48ed-bc7b-5c21.PNG"&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.c360.com/Forums/Uploads/Images/40a89207-e038-4603-a90e-e5e4.PNG"&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.c360.com/Forums/Uploads/Images/b7a58849-576a-4b37-ba20-a052.PNG"&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.c360.com/Forums/Uploads/Images/c4a374e9-9148-4dd7-aa70-f949.PNG"&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.c360.com/Forums/Uploads/Images/bea5b4c8-b5f3-42f9-b77d-e202.PNG"&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.c360.com/Forums/Uploads/Images/ad8a00d8-ebb4-4c4d-830b-075c.PNG"&gt;</description><pubDate>Mon, 30 Oct 2006 22:41:16 GMT</pubDate><dc:creator>Jeremie Desautels</dc:creator></item></channel></rss>