title: Get results from fetchXml using new retrieveMultipleRecords (Client API reference)
body: <p>Having trouble figuring how to get results from the following fetchXml using the new retrieveMultipleRecords (Client API reference):</p>
  
  <pre><code>var request = "&lt;fetch output-format='xml-platform' distinct='true' version='1.0' mapping='logical'&gt;" +
  "&lt;entity name='msdyn_incidenttype'&gt;" +
  "&lt;attribute name='msdyn_name'/&gt;" +
  "&lt;attribute name='createdon'/&gt;" +
  "&lt;attribute name='msdyn_estimatedduration'/&gt;" +
  "&lt;attribute name='msdyn_incidenttypeid'/&gt;" +
  "&lt;order attribute='msdyn_name' descending='false'/&gt;" +
  "&lt;link-entity name='product' link-type='inner' alias='ag' from='productid' to='aka_productfamilyid'&gt;" +
  "&lt;link-entity name='msdyn_customerasset' link-type='inner' alias='ah' from='msdyn_product' to='productid'&gt;" +
  "&lt;filter type='and'&gt;" +
  "&lt;condition attribute='msdyn_customerassetid' operator='eq' uiname='' uitype='msdyn_customerasset' value='${custAssetId}'/&gt;" +
  "&lt;/filter&gt;" +
  "&lt;/link-entity&gt;" +
  "&lt;/link-entity&gt;" +
  "&lt;/entity&gt;" +
  "&lt;/fetch&gt;";
  </code></pre>
  
  <p>I use the above fetchXml with the new client api reference as follows:</p>
  
  <pre><code>var results = Xrm.WebApi.retrieveMultipleRecords("msdyn_incidenttype",request).then(
    function success(result) {
        for (var i = 0; i &lt; result.entities.length; i++) {
            console.log(result.entities[i]);
        }
        console.log("Next page link: " + result.nextLink);
        // perform additional operations on retrieved records
    },
    function (error) {
        console.log(error.message);
        // handle error conditions
    }
  </code></pre>
  
  <p>The document I read (<a href="https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/retrievemultiplerecords" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/retrievemultiplerecords</a>) states that the second parameter are options and if is fetchXml (as I am using) then to specify it there.  However Im receiving the following errors in console:</p>
  
  <blockquote>
    <p>HTTP400: BAD REQUEST - The request could not be processed by the
    server due to invalid syntax. (XHR)GET -
    <a href="https://dev.crm.dynamics.com/api/data/v9.0/msdyn_incidenttypes?fetch" rel="nofollow noreferrer">https://dev.crm.dynamics.com/api/data/v9.0/msdyn_incidenttypes?fetch</a>
    output-format='xml-platform' distinct='true' version='1.0'
    mapping='logical'>entity name='msdyn_incidenttype'>attribute
    name='msdyn_name'/>attribute name='createdon'/>attribute
    name='msdyn_estimatedduration'/>attribute
    name='msdyn_incidenttypeid'/>order attribute='msdyn_name'
    descending='false'/>link-entity name='product' link-type='inner'
    alias='ag' from='productid' to='aka_productfamilyid'>link-entity
    name='msdyn_customerasset' link-type='inner' alias='ah'
    from='msdyn_product' to='productid'>filter type='and'>condition
    attribute='msdyn_customerassetid' operator='eq' uiname=''
    uitype='msdyn_customerasset'
    value='${custAssetId}'/>/filter>/link-entity>/link-entity>/entity>/fetch></p>
  </blockquote>
  
  <p>Am I missing something here?</p>