XMLHttpRequest vs Xrm.WebApi If you have written JavaScript code for Dynamics 365 you have seen the use of XMLHttpRequest or Xrm.WebApi to make server-side calls. The question is which one is the right one to use? So, let’s analyze the two types of calls. XMLHtttpRequest 1. Synchronous a. Sample Code var req = new XMLHttpRequest(); req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v9.1/accounts", false ); 2. Asynchronous a. Sample Code var req = new XMLHttpRequest(); req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v9.1/accounts", true ); So, passing true parameter is going to make asynchronous call while passing it false is going to make a Synchronous call. Xrm.WebApi 1. Asynchronous a. There is...