locked
CRM4 - Access Denied - Outlook only RRS feed

  • Question

  • Hi,

     

    I have an aspx page which includes the following code:

     

    String str = "<script language=JavaScript>";
    str += "var crmForm = window.opener.document.crmForm;";

    str += "crmForm.all.address1_country.DataValue='" + myCountry.Text + "';"; 
    str += "</script>";

    ClientScript.RegisterStartupScript(typeof(string), "str1", str);

     

    This aspx page is called via a button in ISV.Config.

     

    Everything runs fine when using the web browser.  But if run via Outlook (not off-line)  I get an 'Access Denied' error on the following line:

    var crmForm = window.opener.document.crmForm;

     

    Currently I'm running everything within a VPC, so there's just a single domain.

     

    What am I missing?  Is what I'm trying to do just not possible using the Outlook client?

     

    Any help greatfully received.

     

    Thanks
    Lisa

     


     

    Friday, August 29, 2008 1:19 PM

Answers

  • Maybe a bit late for the previous posters, but for reference this sounds link IE does not recognise your aspx page as being in the same web site (or from IE's perspective, DNS domain) as the calling page. Rhett's suggestions should help when diagnosing the client, but also compare the URl in ISV.config with that configured in the CRM Outlook client
    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Thursday, June 3, 2010 6:56 PM
    Moderator

All replies

  • What if you try this:

    var crmForm = window.opener.parent.document.crmForm

    Friday, August 29, 2008 11:24 PM
  • Hi Steven - Afraid I get the same error with your idea.

     

    Any other thoughts?

    Monday, September 1, 2008 9:19 AM
  • Hi All

    Did any of you guys eventually resolve this ? I'm getting same problem....

     

    Friday, March 26, 2010 10:30 AM
  • Try to debug the code by either using IE Developer tools or placing the keyword debugger at the top of the script block.

    Then when you start debugging have a look at the window object  and see what properties it exposes. I think it may be blocked due to security but ther emay be another property like window.parent or window.opener.documentElement or something similiar.


    MSCRM Bing'd - http://bingsoft.wordpress.com
    Friday, March 26, 2010 10:58 AM
    Moderator
  • Maybe a bit late for the previous posters, but for reference this sounds link IE does not recognise your aspx page as being in the same web site (or from IE's perspective, DNS domain) as the calling page. Rhett's suggestions should help when diagnosing the client, but also compare the URl in ISV.config with that configured in the CRM Outlook client
    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Thursday, June 3, 2010 6:56 PM
    Moderator
  • Thanks  Steven !!

    It works for me.


    • Proposed as answer by Shubha_Mhatre Thursday, October 7, 2010 10:52 AM
    Wednesday, September 22, 2010 10:49 AM