title: Missing lookup in the API?
body: <p>I'm using JavaScript and the Dynamics API to fetch my entities, but for some reason fields of type <code>Lookup</code> does not get passed to the JavaScript. Simpler types ad single line, multiple line, number and such are all passed thru as they are fields of the entity, but not fields of the type <code>Lookup</code>.</p>
  
  <p>My query looks like this:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>var req = new XMLHttpRequest()
  req.open("GET",encodeURI(Xrm.Page.context.getClientUrl() + "/api/data/v8.1/pss_servicetasks"), true);
  req.setRequestHeader("Accept", "application/json");
  req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
  req.setRequestHeader("OData-MaxVersion", "4.0");
  req.setRequestHeader("OData-Version", "4.0");
  </code></pre>
  
  <p>This query returns all the entities with their fields (without the fields of type <code>Lookup</code>) of the type <code>pss_servicetasks</code>.</p>
  
  <p>Is there a reason why I'm missing the lookups? It gets all the other fields in the entities.</p>