Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

requestobject() method doesn't called in Offline html page in woordford . below is my code please check

$
0
0
<html>
<head>
<!-- Activate IE9 document mode, if available -->
<metahttp-equiv="X-UA-Compatible"content="IE=edge"/>
<metaname="viewport"content="initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=false">

<metaname="viewport"content="initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<scripttype="text/javascript"src="../jquery-3.3.1.min.js"></script>
<scripttype="text/javascript"src="../Schema.js"></script>
<scripttype="text/javascript"src="../Enums.js"></script>
<scripttype="text/javascript"src="../Common.js"></script>
<scripttype="text/javascript"src="JSBridge.js"></script>
</head>
<bodyonload="pageload();"onChange="pageload();">

<body>
<h3> Hello </h3>
<inputtype="text"id="test1"></input>
<inputtype="text"id="test2"></input>
<inputtype="text"id="test3"></input>
<inputtype="text"id="test4"></input>
<script>

function pageload(){

document.getElementById("test1").value="abc";
MobileCRM.UI.EntityForm.requestObject(function (entityForm) {

document.getElementById("test2").value="efg";
mainFunction(entityForm);
  returntrue;
}, MobileCRM.bridge.alert, null);

function mainFunction(entityForm){
document.getElementById("test2").value="efg";
var accountEntity = entityForm.entity;
accountEntity.properties.name ="abc";
accountEntity.properties.emailaddress1 ="aakashc276@gmail.com";
MobileCRM.bridge.alert("yes");
var xhr =new XMLHttpRequest();
xhr.open("GET", "">reqres.in/.../3", true);
xhr.onload =function () {
document.getElementById("test4").value=xhr.responseText;
var firstname = xhr.responseText.data.name;
accountEntity.properties.name = firstname;

xhr.send();

}
}
}
</script>
</body>


</html>





Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>