I am working on Microsoft Dynamics CRM 2016. I have a description
field on my Lead form along with that I have added an HTML web resource. When I enter a description
value on the CRM form, it should display on my HTML web resource.
How can this be achieved?
HTML web resource code:
<html>
<head>
<script src="../ClientGlobalContext.js.aspx" type="text/javascript"></script>
<script text="text/javascript">
var description = Xrm.Page.getAttribute("description").getValue();
</script>
</head>
<body>
<table>
<thead><tr><th>Parameter</th><th>Value</th></tr></thead>
<tbody>
<tr><td>description</td><td id="description">null</td></tr>
</tbody>
</table>
</body>
</html>
Then in the web resource's properties I have:
- added a custom parameter: (data)= RelatedEntity=leads&RelatedField=description
- enabled the option to pass record object-type code and unique identifier as parameters
- added
description
in dependencies