Hello All,
By doing some R & D for the above mentioned issue i am able to get/Display data locally by following this in Table/TR/TD format with the use of below code but not in the CRM web resource and thought to share the same for reference. In CRM still gettting UNDEFINED error for HTML webresource. Please let me know for cross domain external service url accessibility in CRM web resource HTML.
<html lang="en" xmlns="www.w3.org/.../xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<!--<script src="ajax.googleapis.com/.../jquery.min.js"></script>-->
<script type="text/javascript" src="../WebResources/eb_xrmjquery"></script>
<script type="text/javascript">
function ShowData() {
debugger;
//$.support.cors = true;
jQuery.support.cors = true;
$.ajax({
url:"server/.../0000003049",
type: "GET",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
debugger;
alert(data);
$("#tdHInsurance").text(data.HInsurance);
$("#tdAccountType").text(data.AccountType);
$("#tdActiveLoan").text(data.ActiveLoan);
$("#tdIndexName").text(data.IndexName); $("#tdCurrentPrincipalBalance").text(data.CurrentPrincipalBalance);
},
error: function (xhr, error, status) {
alert(xhr.responseText);
}
});
}
</script>
</head>
<body>
<input type="button" value="ShowData" onclick="ShowData()" />
<table>
<tr>
<td>HInsurance</td>
<td id="tdHInsurance"></td>
</tr>
<tr>
<td>Account Type</td>
<td id="tdAccountType"></td>
</tr>
<tr>
<td>Active Loan</td>
<td id="tdActiveLoan"></td>
</tr>
<tr>
<td> Index Name</td>
<td id="tdIndexName"></td>
</tr>
<tr>
<td>Current Principal Balance</td>
<td id="tdCurrentPrincipalBalance"></td>
</tr>
</table>
</body>
</html>