title: Show Filtered Lookup in CRM2011 from Silverlight Grid
body: <p>I recently show up all products on a "Lookup" Field on a Inline Silverlight App on the CRM2011 Quote form.</p>
  
  <p>I do this with directly calling the link of the Lookup: </p>
  
  <pre><code>    var uri = (ScriptObject)crmUri.Invoke("create", string.Format("/_controls/lookup/lookupinfo.aspx?LookupStyle=single&amp;objecttypes={0}", objectType));
  
      var dArgs = (ScriptObject)HtmlPage.Window.CreateInstance("Object");
      dArgs.SetProperty("items", new string[] { "" });
  
      dynamic dlgResult = HtmlPage.Window.Invoke("showModalDialog", uri, dArgs, "dialogWidth:500px;dialogHeight:700px");
  </code></pre>
  
  <p>Our Customer wants to filter the lookup view on a value of a specific field on the product form.</p>
  
  <p>This field is a optionset and can be 1 or 2. </p>
  
  <p>I tried to add <code>"&amp;$filter=" + "producttypecode/Value" + " eq 1"</code> or <code>"&amp;$filter=" + "producttypecode" + " eq 1"</code>   in the link, but this always Returns a error message.</p>
  
  <p>Are there any suggestions? </p>