{"id":1104,"date":"2014-12-19T16:39:46","date_gmt":"2014-12-19T11:09:46","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=1104"},"modified":"2014-12-19T16:39:46","modified_gmt":"2014-12-19T11:09:46","slug":"how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/","title":{"rendered":"How to show Filtered Lookup Dialog in Dynamics CRM through Script"},"content":{"rendered":"<p>We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The lookup has to be filtered on the basis of a value in the lookup field which was there on the form.<\/p>\n<p>Now the question was, how were we supposed to achieve this? We had already done a Lookup Dialog to show all the records for an entity, but this was something new and enthralling.<\/p>\n<p>We dived into it and after a few hours of R&amp;D, we came up with a solution. This blog is entirely dedicated in explaining and implementing that solution.<\/p>\n<p>Let us begin\u00a0with our\u00a0entity structure which comprised of\u00a0an entity called Contractor and it was in N:1 relation with Project and Payment Schedule where as Payment Schedule was in N:1 relation with Project.<\/p>\n<p>The requirement was to show the Filtered Custom Lookup dialog containing Payment Schedule records, related to the Project (Lookup field) selected on the Contractor, on form load of Contractor.<\/p>\n<p><strong>Screenshots:<\/strong><\/p>\n<p><strong>Note: <\/strong>Lookup Dialog seen in the below screenshots is a Custom Lookup Dialog opened on form load using JavaScript.<\/p>\n<p>Below screenshot shows the Project selected as Test Project having Payment Schedule records for it as a result of which we can see that record in the Lookup Dialog.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1106\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg\" alt=\"Test Payment Schedule\" width=\"626\" height=\"428\" \/><\/a><\/p>\n<p>Below screenshot shows the Project selected as Test Project 2 and Test Project 2 has no Payment Schedule records for it and as a result we cannot see any records in the Lookup Dialog.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Payment-Schedule-Lookup.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1107\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Payment-Schedule-Lookup.jpg\" alt=\"Payment Schedule Lookup View\" width=\"626\" height=\"419\" \/><\/a><\/p>\n<p>Let&#8217;s start with the technical part of it.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<p>\/\/function to open filtered entity lookup to select record<\/p>\n<p>function openFilteredLookup(defaultType, defaultViewId, currentObjectType, currentId, rDependentAttr, rId, rType, relationshipId) {<\/p>\n<p>var functionName = &#8220;openLookup&#8221;;<\/p>\n<p>try {<\/p>\n<p>&nbsp;<\/p>\n<p>if (isValid(currentObjectType) &amp;&amp; isValid(currentId)) {<\/p>\n<p>\/\/prepare lookup url<\/p>\n<p>var url = &#8220;\/_controls\/lookup\/lookupinfo.aspx?AllowFilterOff=0&amp;DefaultType=&#8221; + defaultType + &#8220;&amp;DefaultViewId=%7b&#8221; + defaultViewId + &#8220;%7d&amp;DisableQuickFind=0&amp;DisableViewPicker=1&amp;IsInlineMultiLookup=0&amp;LookupStyle=single&amp;ShowNewButton=1&amp;ShowPropButton=1&amp;browse=false&amp;currentObjectType=&#8221; + currentObjectType + &#8220;&amp;currentid=%7b&#8221; + currentId + &#8220;%7d&amp;dType=1&amp;mrsh=false&amp;objecttypes=&#8221; + defaultType + &#8220;&amp;rDependAttr=&#8221; + rDependentAttr + &#8220;&amp;rId=%7b&#8221; + rId + &#8220;%7d&amp;rType=&#8221; + rType + &#8220;&amp;relationshipid=&#8221; + relationshipId + &#8220;&#8221;;<\/p>\n<p>} else {<\/p>\n<p>\/\/prepare lookup url<\/p>\n<p>var url = &#8220;\/_controls\/lookup\/lookupinfo.aspx?AllowFilterOff=0&amp;DefaultType=&#8221; + defaultType + &#8220;&amp;DefaultViewId=%7b&#8221; + defaultViewId + &#8220;%7d&amp;DisableQuickFind=0&amp;DisableViewPicker=1&amp;IsInlineMultiLookup=0&amp;LookupStyle=single&amp;ShowNewButton=1&amp;ShowPropButton=1&amp;browse=false&amp;dType=1&amp;mrsh=false&amp;objecttypes=&#8221; + defaultType + &#8220;&amp;rDependAttr=&#8221; + rDependentAttr + &#8220;&amp;rId=%7b&#8221; + rId + &#8220;%7d&amp;rType=&#8221; + rType + &#8220;&amp;relationshipid=&#8221; + relationshipId + &#8220;&#8221;;<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/Set the Dialog Width and Height<\/p>\n<p>var DialogOptions = new Xrm.DialogOptions();<\/p>\n<p>\/\/Set the Width<\/p>\n<p>DialogOptions.width = 500;<\/p>\n<p>\/\/Set the Height<\/p>\n<p>DialogOptions.height = 550;<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/open dialog<\/p>\n<p>Xrm.Internal.openDialog(Mscrm.CrmUri.create(url).toString(), DialogOptions, null, null, CallbackFunction);<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/Set the variable to false<\/p>\n<p>isOnLoad = false;<\/p>\n<p>&nbsp;<\/p>\n<p>} catch (e) {<\/p>\n<p>throwError(e, functionName);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p><strong>What are the parameters passed for the above used function?<\/strong><\/p>\n<ul>\n<li>defaultType = Object Type Code of the entity which needs to be shown in the Lookup.<\/li>\n<li>defaultViewId = GUID of the defaultView which will be set for the Look In section of the Lookup Dialog, in order to get the defaultView GUID, you can use the following code :<\/li>\n<\/ul>\n<p>\/\/Get the Default View id<\/p>\n<p>Xrm.Page.getControl(controlName).getDefaultView().replace(&#8220;{&#8220;, &#8220;&#8221;).replace(&#8220;}&#8221;, &#8220;&#8221;).trim();<\/p>\n<ul>\n<ul>\n<li>controlName: It is the name of the Lookup Control.<\/li>\n<\/ul>\n<\/ul>\n<ul>\n<li>currentObjectType = Object Type Code of the current entity.<\/li>\n<li>currentId = GUID of the current record.<\/li>\n<li>rDependentAttr = new_contractor.new_projectid<br \/>\nAs the name suggest it`ll give the attribute on the basis of which lookup is filtered.<br \/>\nThe above rDependentAttr value is used in our current demo.<\/p>\n<ul>\n<li>new_contractor: It is the name of the current entity.<\/li>\n<li>new_projectid: It is the control\/attribute name on the basis of which the Lookup is filtered.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>rId = It is the GUID of the record selected in the new_projectid field.<\/li>\n<li>rType = It is the Object Type Code of the new_projectid.<\/li>\n<li>relationshipId = new_new_project_new_paymentschedule.<\/li>\n<\/ul>\n<p>It is the relationship name of how the Project and Payment Schedule entities are related.<\/p>\n<p><strong>Note:<\/strong><\/p>\n<ol>\n<li>We can retrieve Entity Metadata to get the Object Type Code of any entity.<\/li>\n<li>The above method is an unsupported method to get the Lookup.<\/li>\n<li><a href=\"https:\/\/www.inogic.com\/blog\/2014\/09\/how-to-get-lookup-dialog-in-crm-2013\">How to use Xrm.Internal.openDialog method?<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/\">Read More: How to show Filtered Lookup Dialog in Dynamics CRM through\u2026 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,21,22,24,33],"tags":[592,740,816,817,1012],"class_list":["post-1104","post","type-post","status-publish","format-standard","hentry","category-dynamics-crm","category-dynamics-crm-2013","category-dynamics-crm-2015","category-dynamics-crm-2016","category-javascript","tag-dynamics-crm","tag-entity","tag-filtered","tag-filtered-lookup-dynamics-crm","tag-lookup"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Inogic\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta property=\"og:description\" content=\"We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2014-12-19T11:09:46+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2014-12-19T11:09:46+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inogicindia\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta name=\"twitter:description\" content=\"We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Inogic\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#blogposting\",\"name\":\"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks\",\"headline\":\"How to show Filtered Lookup Dialog in Dynamics CRM through Script\",\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/12\\\/Test-Payment-Schedule.jpg\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#articleImage\"},\"datePublished\":\"2014-12-19T16:39:46+05:30\",\"dateModified\":\"2014-12-19T16:39:46+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#webpage\"},\"articleSection\":\"Dynamics CRM, Dynamics CRM 2013, Dynamics CRM 2015, Dynamics CRM 2016, JavaScript, Dynamics CRM, Entity, Filtered, filtered lookup Dynamics CRM, lookup\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/#listItem\",\"name\":\"Dynamics CRM\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/#listItem\",\"position\":2,\"name\":\"Dynamics CRM\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/dynamics-crm-2013\\\/#listItem\",\"name\":\"Dynamics CRM 2013\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/dynamics-crm-2013\\\/#listItem\",\"position\":3,\"name\":\"Dynamics CRM 2013\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/dynamics-crm-2013\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#listItem\",\"name\":\"How to show Filtered Lookup Dialog in Dynamics CRM through Script\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/#listItem\",\"name\":\"Dynamics CRM\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#listItem\",\"position\":4,\"name\":\"How to show Filtered Lookup Dialog in Dynamics CRM through Script\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/dynamics-crm-2013\\\/#listItem\",\"name\":\"Dynamics CRM 2013\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"By Inogic\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inogic-logo.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#organizationLogo\",\"width\":1000,\"height\":325,\"caption\":\"inogic logo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inogicindia\",\"https:\\\/\\\/twitter.com\\\/inogic\",\"https:\\\/\\\/www.instagram.com\\\/inogicindia\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCM4V7ousgLSu1hbOEv4DUuQ\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inogicindia\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/\",\"name\":\"Inogic\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Inogic\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#webpage\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/\",\"name\":\"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2014\\\/12\\\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"datePublished\":\"2014-12-19T16:39:46+05:30\",\"dateModified\":\"2014-12-19T16:39:46+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"alternateName\":\"Inogic\",\"description\":\"By Inogic\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks","description":"We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The","canonical_url":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#blogposting","name":"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks","headline":"How to show Filtered Lookup Dialog in Dynamics CRM through Script","author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg","@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#articleImage"},"datePublished":"2014-12-19T16:39:46+05:30","dateModified":"2014-12-19T16:39:46+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#webpage"},"isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#webpage"},"articleSection":"Dynamics CRM, Dynamics CRM 2013, Dynamics CRM 2015, Dynamics CRM 2016, JavaScript, Dynamics CRM, Entity, Filtered, filtered lookup Dynamics CRM, lookup"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.inogic.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/#listItem","name":"Dynamics CRM"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/#listItem","position":2,"name":"Dynamics CRM","item":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/dynamics-crm-2013\/#listItem","name":"Dynamics CRM 2013"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/dynamics-crm-2013\/#listItem","position":3,"name":"Dynamics CRM 2013","item":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/dynamics-crm-2013\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#listItem","name":"How to show Filtered Lookup Dialog in Dynamics CRM through Script"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/#listItem","name":"Dynamics CRM"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#listItem","position":4,"name":"How to show Filtered Lookup Dialog in Dynamics CRM through Script","previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/dynamics-crm-2013\/#listItem","name":"Dynamics CRM 2013"}}]},{"@type":"Organization","@id":"https:\/\/www.inogic.com\/blog\/#organization","name":"Microsoft Dynamics 365 CRM Tips and Tricks","description":"By Inogic","url":"https:\/\/www.inogic.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/inogic-logo.png","@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#organizationLogo","width":1000,"height":325,"caption":"inogic logo"},"image":{"@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/inogicindia","https:\/\/twitter.com\/inogic","https:\/\/www.instagram.com\/inogicindia\/","https:\/\/www.youtube.com\/channel\/UCM4V7ousgLSu1hbOEv4DUuQ","https:\/\/www.linkedin.com\/company\/inogicindia"]},{"@type":"Person","@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author","url":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/","name":"Inogic","image":{"@type":"ImageObject","@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Inogic"}},{"@type":"WebPage","@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#webpage","url":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/","name":"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks","description":"We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/#breadcrumblist"},"author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"creator":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"datePublished":"2014-12-19T16:39:46+05:30","dateModified":"2014-12-19T16:39:46+05:30"},{"@type":"WebSite","@id":"https:\/\/www.inogic.com\/blog\/#website","url":"https:\/\/www.inogic.com\/blog\/","name":"Microsoft Dynamics 365 CRM Tips and Tricks","alternateName":"Inogic","description":"By Inogic","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic","og:type":"article","og:title":"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks","og:description":"We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The","og:url":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/","og:image":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg","og:image:secure_url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg","article:published_time":"2014-12-19T11:09:46+00:00","article:modified_time":"2014-12-19T11:09:46+00:00","article:publisher":"https:\/\/www.facebook.com\/inogicindia","twitter:card":"summary_large_image","twitter:site":"@inogic","twitter:title":"How to show Filtered Lookup Dialog in Dynamics CRM through Script - Microsoft Dynamics 365 CRM Tips and Tricks","twitter:description":"We had a requirement where in we were supposed to show a Filtered Custom Lookup on form load. By Filtered Custom Lookup, it meant that we were supposed to create a Lookup dialog similar to CRM Filtered lookup (Filtered Lookup value changes on the basis of other Lookup on which it is dependent) dialog. The","twitter:creator":"@inogic","twitter:image":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2014\/12\/Test-Payment-Schedule.jpg","twitter:label1":"Written by","twitter:data1":"Inogic","twitter:label2":"Est. reading time","twitter:data2":"4 minutes"},"aioseo_meta_data":{"post_id":"1104","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-02-02 06:10:57","updated":"2025-07-03 23:15:03","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/\" title=\"Dynamics CRM\">Dynamics CRM<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/dynamics-crm-2013\/\" title=\"Dynamics CRM 2013\">Dynamics CRM 2013<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to show Filtered Lookup Dialog in Dynamics CRM through Script\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.inogic.com\/blog"},{"label":"Dynamics CRM","link":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/"},{"label":"Dynamics CRM 2013","link":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/dynamics-crm-2013\/"},{"label":"How to show Filtered Lookup Dialog in Dynamics CRM through Script","link":"https:\/\/www.inogic.com\/blog\/2014\/12\/how-to-show-filtered-lookup-dialog-in-dynamics-crm-through-script\/"}],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/1104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=1104"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/1104\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=1104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=1104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=1104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}