title: Uncaught TypeError: Cannot read property 'retrieveMultiple' of undefined
body: <p>I am trying to run a JavaScript on an HTML page in CRM 9.0 which is giving me following error.</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'retrieveMultiple' of
    undefined</p>
  </blockquote>
  
  <p>I have just migrated my solution from CRM 8.2 to CRM 9.0 everything was working fine in CRM 8.2, even when i run the same page in CRM 8.2 environment it runs fine but in CRM 9.0 it is giving me above error.
  Also, I when i run the same page from within inside CRM 9.0, it works fine. Only when i run this page through on web using a URL it gives this error.
  I do not understand why this error is coming,</p>
  
  <p>I am using below code where error is coming,</p>
  
  <pre><code> XrmSvcToolkit.retrieveMultiple({
      entityName: SpecialOperationEntity,  //Update this code later
      odataQuery: Query,
      async: false,
      successCallback: successCallback,
      errorCallback: errorCallback
  });
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The image taken is from the console. Why is the XrmSvcToolkit error coming I am not sure. Can anyone please guide? As the reference is available in HTML page</p>
  
  <p><a href="https://i.stack.imgur.com/56Ima.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/56Ima.png" alt="enter image description here"></a></p>
  
  <p><strong>EDIT 2:</strong></p>
  
  <p>For all those that are suggesting me to use Web.API</p>
  
  <p>When I am using Web Api and comment out this current logic the actual js file does not even load inside HTML and the HTML file gives an error where it says that it cannot find the functions defined in js file (because the js file did not load in this case).</p>
  
  <p>I am using below code,</p>
  
  <pre><code> Xrm.WebApi.retrieveMultipleRecords(SpecialOperationEntity, "$select=vrp_Output&amp;$filter=vrp_Operation eq '" + Operation + "' and vrp_Input eq '" + JsonInputParameter + "'";).then(
         successCallback
          ,errorCallback
      );
  </code></pre>
  
  <p><strong>Note:</strong>
  successCallback and errorCallback are two functions defined below this code block</p>