I am trying to get a value from Dynamics CRM into a HTML webresource. I have found this and tried to make the code out of it:
https://msdn.microsoft.com/en-us/library/jj602964(v=crm.7).aspx
It says to use var nameValue = Xrm.Page.getAttribute("name").getValue();
to get it out.
My Code is (the alert is just to try if it gets the right value):
<html><head>
<meta charset="utf-8">
</head>
<body>
<button onclick="getquotenumber()">Try it</button>
<script>
function getquotenumber() {
var getquote = Xrm.Page.getAttribute("quotenumber").getValue();
alert(getquote);
}
</script>
</body></html>
When clicking "Try it" nothing happens! What am I doing wrong?
Thanks, Johannes