Posted 10/30/2006 10:41:16 PM | | | | This sample is based on a suggestion by John Marx. Overview 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. Installation Step 1 – Edit ISV.config 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: <Menu Title="Testing c360 SDK"> <MenuItem Title="Multiple Lookups" Url="http://localhost:5517/c360Sdk/Samples/MultipleLookups/MultipleLoookups.aspx" WinMode="0" Client="Web,OutlookWorkstationClient" AvailableOffline="false" /> </Menu> Note: you will need to adjust the url in the above sample to match your environment. Step 2 – Copy files In your Visual Studio 2005 project, make sure you have a folder called “Samples” and create a sub-folder called “MultipleLookups”. Copy the ASPX page and its corresponding code behind file: - MultipleLookups.aspx
- MultipleLookups.aspx.cs
Screenshots 






|
| |
|