title: Dynamics CRM custom filter on lookup view not working
body: <p>There are a few articles online how to apply your custom filter to lookup field. I thought there couldn't be anything simpler and yet..</p>
  
  <pre><code>function addFilter(accountId) {
  //create a filter xml
  var filter = "&lt;filter type='and'&gt;" +
      "&lt;condition attribute='parentaccountid' operator='eq' value='"+accountId+"'/&gt;" +
      "&lt;/filter&gt;";
  
  //add filter
  Xrm.Page.getControl("my_lookup_field").addCustomFilter(filter);
  }
  </code></pre>
  
  <p>I want to see in the lookup quick find view only accounts that parent account is set to specific account. Yet once I apply this filter no account will display in the view. I am really lost.</p>