following is my code to call pageload() method onload of account entity using iframe
i have taken iframe and maped this html resource.
<html>
<head>
<!-- Activate IE9 document mode, if available -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=false">
<script type="text/javascript" src="JSBridge.js"></script>
</head>
<body onload="pageload();" onChange="pageload();">
<h3> Hello </h3>
<script>
//AccountResco.Main.Init();
function pageload(){
MobileCRM.UI.EntityForm.requestObject(
function(entityForm){
mainFunction(entityForm);
},
function (err) {alert(err);},
null);
function mainFunction(entityForm){
var accountEntity = entityForm.entity;
accountEntity.properties.name = "abc";
accountEntity.properties.emailaddress1 = "aakashc276@gmail.com";
MobileCRM.bridge.alert("yes");
var xhr = new XMLHttpRequest();
xhr.onload = function () {
var firstname = responseText.data.name;
accountEntity.properties.name = firstname;
xhr.send();
}
}
}
</script>
</body>
</html>
I have the same question (0)

Report
All responses (
Answers (