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)

Sharepoint document grid on form

(0) ShareShare
ReportReport
Posted on by 2,510

Hi, I am trying to display sharepoint document grid on the form through iframe.  I am using the below code but it doesn't work well, it displays the grid and disappears. I am using DYnamics 365

 var url = Xrm.Page.context.getClientUrl() +
        "/userdefined/areas.aspx?formid=ab44efca-df12-432e-a74a-83de61c3f3e9&inlineEdit=1&navItemName=Documents&oId=%7b" +
        Xrm.Page.data.entity.getId().replace("{", "").replace("}", "") + "%7d&oType=" +
        Xrm.Page.context.getQueryStringParameters().etc + 
        "&pagemode=iframe&rof=true&security=852023&tabSet=areaSPDocuments&theme=Outlook15White";

    Xrm.Page.getControl("IFRAME_document").setSrc(url);


*This post is locked for comments

I have the same question (0)
  • sdnd2000 Profile Picture
    2,510 on at

    Hi, I am trying to display sharepoint document in subgrid with IFrame, it worked for me, but it display the error like the below when someone else viewing, what else configurations I have missed? And I also attached the JS code.

    function SetDocumentFrame(){
        debugger;
        var url = Xrm.Page.context.getClientUrl() +
            "/userdefined/areas.aspx?formid=ab44efca-df12-432e-a74a-83de61c3f3e9&inlineEdit=1&navItemName=Documents&oId=%7b" +
            Xrm.Page.data.entity.getId().replace("{", "").replace("}", "") + "%7d&oType=" +
            Xrm.Page.context.getQueryStringParameters().etc + 
            "&pagemode=iframe&rof=true&security=852023&tabSet=areaSPDocuments&theme=Outlook15White";
    
        Xrm.Page.getControl("IFRAME_document").setSrc(url);
    }


    2017_2D00_09_2D00_13_5F00_1510.png

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Please, don't create duplicated threads. If you want to up your question just find it an add a reply.

  • Suggested answer
    Community Member Profile Picture
    on at

    Try this method:

    jlattimer.blogspot.in/.../show-sharepoint-documents-on-main-form.html

  • sdnd2000 Profile Picture
    2,510 on at

    That is the exact same article I followed

  • Community Member Profile Picture
    on at

    What versions of CRM and SharePoint are you using, and are they On-Prem or Online?

  • sdnd2000 Profile Picture
    2,510 on at

    It is dynamics 365, on prem

  • Community Member Profile Picture
    on at

    That may be why.  I think the Code in that blog is specific to CRM and SP online only.  Specifically, SharePoint on-premise is probably throwing that error up in the IFrame and not allowing you to view the files.

    Sorry... :(

  • sdnd2000 Profile Picture
    2,510 on at

    then, on-prem, is there anyway to do iframe?

  • Community Member Profile Picture
    on at

    Not that I am aware of, no.  Sorry.

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    If you want to resolve your issue you can use following approach:

    1. Open record for which SP integration is activated.

    2. Open Documents from associated records menu.

    3. Using browser tools you can get url of document folder.

    4. Modify initial script to use correct url.

    5. Test it and use.

    Good luck. There is nothing special. I'm confident that author of mentioned article used exactly the same approach to build that code.

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