Access Dynamics CRM Context from Custom Html Web Resource in CRM 2013 RRS feed

  • Question

  • Hi Guys,

    I am facing issue while accessing Xrm context from Html WebResource which is opened outside CRM. here is my code below(Same code works fine in CRM 2011, its not working when I move it to CRM 2013 version).

    Contact Form On-load:


    New_Text.html Script:

    <html><head></head><body bgcolor="#f6f8fa">
    <script src="../WebResources/new_jquery.js" type="text/javascript"></script>
    < script src="../WebResources/jquery_1.9.1.min.js" type="text/javascript"></script>
    < script src="../WebResources/new_json" type="text/javascript"></script>
    < script src="../ClientGlobalContext.js.aspx" type="text/javascript"></script>
    < script language="javascript" type="text/javascript">
        $(document).ready(function () {

        function onLoad() {
            if (window.top.frames.opener) { Xrm = window.top.frames.opener.Xrm; }
            else if (window.parent) { Xrm = window.parent.Xrm; }
    < /script>
    < /body></html>

    Am getting "Permission Denied" error while trying to access Xrm Context. Any help here? Thanks in Advance!

    Wednesday, September 10, 2014 4:35 PM