"parent" keyword of javascript in html webresource RRS feed

  • Question

  • I am working on one entity in CRM2016.

    This entity having refference to one script file "utility.js", and below is the content of that script file:

    console.log("utility.js Start");
    function TestingFunction()
    	alert("Testing Function called!!!");
    console.log("utility.js Stop");

    This entity have one html web resource in the form which is trying to access the "TestingFunction" of above 

    script file "utility.js" like:

            function myFunction() {
                parent.TestingFunction(); //This code throwing an error: VM14326:1 Uncaught TypeError: parent.TestingFunction is not a function
    <body style="word-wrap: break-word;">
        <button onclick="myFunction()">Click me</button>
    1) This same solution is working on CRM2015
    2) I do not want to add one more "utility.js" refference into my html. (<script> .... </script>)
    3) i already check the "utility.js" file is loading or not in browser development tool and it is loading properly.

    Any idea whats the issue here in CRM2016?


    Friday, May 13, 2016 10:25 AM