Skip to main content

Notifications

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

Posted on by 175

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>




  • Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Offline Html Does not call on load of account entity in Woordord

    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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans