Hello Sir


This is the code for Web API retrieving data
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">;
<head>
<meta charset="utf-8" />
<title></title>
<script src="new_GlobalHelper"></script>
<script src="new_/Scripts/Somefile"></script>
<script>
function Buttonclick() {



// var contact =
//{
// "firstname": "Sample Contact",
// "lastname": "Web API",

//}

// create account record
//parent.Xrm.WebApi.createRecord("contact",contact).then(
// function success(result) {
// document.getElementById("text").innerHTML = result.id;
// // perform operations on record creation
// },
// function (error) {
// document.getElementById("text").innerHTML = error.message;
// // handle error conditions
// }
//);
// Use retrieve multiple for retrieving multiple records
parent.Xrm.WebApi.retrieveMultipleRecords("contact","$select=firstname,lastname,address1_city&$filter=address1_city eq 'Redmond'", 5000).then(
function success(result) {
var text;
for (var i = 0; i < result.entities.length; i++) {
console.log(result.entities[i]);
text += result.entities[i].firstname
}
// perform additional operations on retrieved records
document.getElementById("text").innerHTML = text;
},
function (error) {
console.log(error.message);
// handle error conditions
}
);



//Accessing from elements from HTML web resource
// We have to follow old code "Xrm.Page" not new code "formContext"
//var accountName = parent.Xrm.Page.getAttribute("name").getValue();

// In HTML web resource , you can use DOM(Document Object Model)
// In JavaScript web resource , DOM is not supported
// document.getElementById("text").innerHTML = accountName
}



</script>


</head>
<body>
<input type="button" value="Click Me" onclick="Buttonclick()" />
<p id="text">

</p>
</body>
</html>

On click Me button there is no response coming