In portals I've created a web form with three steps where the third should be an iframe with some input boxes. We do it like this because its more dynamic and we can leave it up to the entity to load a template of questions for the user to answer.
It works well in Dynamics 365.
But now I've started building a portal for the Dynamics instance and working with web forms. I can load the forms already defined in Dynamics bt when I try to call the XRM like i do when I want to do some stuff with javascript in the background it states that "Xrm is undefined".
<script> var Xrm = window.parent.Xrm; var enity = Xrm.Page.data.entity; var name = Xrm.Page.getAttribute("msdyn_name").getValue(); console.log('msdyn_name = ' + name) </script>
So, is there a way to access XRM for fetching attributes, do queries and stuff like I'm used to with web resources inside Dynamics?