web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Access denied from script error

(0) ShareShare
ReportReport
Posted on by 7,316

Hi,

I am trying to set up an iframe with network folder in it on a custom form. I am using this script on onload of the form.

function SetFileShare() {
debugger;
   //only run when the form is open for Read or Update
   if (Xrm.Page.ui.getFormType() == 2 || Xrm.Page.ui.getFormType() == 3) {
      var folder = Xrm.Page.getAttribute("new_documents").getValue();
       Xrm.Page.getControl("IFRAME_SharedFolderIframe").setSrc("file:///V:\CRM"+ folder );
   }
}

This gives me 'Access denied for file:///V:\CRM from script error.

Can someone please guide me through this?

Thanks for any help!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at

    Hi Meeno, Have you enabled Cross domain access on your Iframe Settings, you will get access denied on network locations unless you enable Network permissions and on your Browser

    Best Wishes, Raz

  • meenoo Profile Picture
    7,316 on at

    Thanks Raz..

    You mean adding network location to trusted zone? If so, I've done that.. but still seeing that error!

  • Bruno Maciel Servulo Profile Picture
    125 on at

    He is talking about the iFrame configuration in CRM. When you open the properties from the iframe, there is a checkbox with "enable cross site" or something like that.

  • meenoo Profile Picture
    7,316 on at

    I did that too. Unchecked the 'Restrict cross-frame scripting'.

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans