web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Field Service forum / Offline Html Does not ...
Field Service forum

Offline Html Does not call on load of account entity in Woordord

(0) ShareShare
ReportReport
Posted on by 189

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.open("GET", "">reqres.in/.../3", true);
xhr.onload = function () {

var firstname = responseText.data.name;
accountEntity.properties.name = firstname;

xhr.send();

}
}
}
</script>
</body>


</html>




I have the same question (0)
  • Thomas David Dayman Profile Picture
    11,323 on at

    Have you added any console.log functions to see if the code is being triggered? Also it might be worth to compare your code to resco jsbridge reference of their website

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Field Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans