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

Get the value from MS CRM Record and Set the value in input textbox of a HTML page

$
0
0
Hi All,
I am using this sample code to get value from MS CRM Contact Record and Set value in text box of a HTML Page. But this code is not working, I want to set the values On Load of the HTML page.
<html> 
<head>
 
</head>
<body onload="retrieveAccount()" style="word-wrap: break-word;">
    <script src="ClientGlobalContext.js.aspx" type="text/javascript" ></script>
    <script type="text/javascript"></script>
    <script>
        function retrieveContact() {
            var fullname = window.parent.Xrm.Page.getAttribute("fullname").getValue();
            var jobtitle = window.parent.Xrm.Page.getAttribute("jobtitle").getValue();
            document.getElementById("name").value = fullname;
            document.getElementById("role").value = jobtitle;
        }
    </script>
    <form>
        <p>
            <label>Fullname</label>
            <input type="text" id="name" onload="retrieveContact()">
        </p>
        <p>
            <label>Jobtitle</label>
            <input type="text" id="role" onload="retrieveContact()">
        </p>
    </form>
</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>