Call Dynamics 365 Web API Using JavaScript - Using XMLHttpRequest

Requirement is to create record for custom entity using dynamics 365 CRM Web API. 1. I have created one custom entity i.e. Person Entity. Display Name is "Person" Logical Name is "new_person" Entity Name is "new_persons" in "ODataV4Metadata.xml" 2. Once you have created any custom entity, You have to download ODataV4Metadata.xml file from Developer resources. Open ODataV4Metadata.xml and search for your entity name. 3. Custom entity is as below. Entity has some custom attributes such as new_firstname new_lastname new_dob new_age new_gender new_indian new_salary new_technology 4. I have included two web resource files in solution. CreatePersonXhtml.html => This file renders html markup in dynamics 365 form. CreatePersonXhtml.js => To call the Web API. 5. You can include above web resource in any custom or system form as per your requirement. 6. CreatePersonXhtml.html as below <html lang=...