SharePoint and CRM 2016 document integration

We have always linked CRM with Sharepoint. Currently we have a CRM 2013 version that uses an iframe link to display documents related to a contact or an account.

This is the jquery in the container.

function Form_ontab()
if ((Xrm.Page.ui.getFormType() == 2 || Xrm.Page.ui.getFormType() == 3 || Xrm.Page.ui.getFormType() == 4) && Xrm.Page.getAttribute("new_accountidentity").getValue() != null)
      var Iframe = Xrm.Page.ui.controls.get("IFRAME_docs");
      var Url  = Iframe.getSrc();
Iframe.setSrc('http://CrmServer/ssp/admin/Accounts/Forms/AllItems.aspx?RootFolder=/ssp/admin/Accounts/' + Xrm.Page.getAttribute("new_accountidentity").getValue());

function Form_onload()

My question is - when we move to CRM 2016 with Sharepoint 2016 will we still use this method or is there an integration between the two systems that will map previous contacts/accounts with their relevant files.

If the above is the only way to keep the docs with the contacts/accounts, how do I enable the iframe to show in CRM. At the moment, i am getting this message.

This content cannot be displayed in a frame
To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.
I have enable the address in HTML Field Security in sharepoint and try to add in
<WebPartPages:AllowFraming runat="server" /> to the master pages.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chinmay PatelChief Technology NinjaCommented:
Hi Sunny,

The changes you made to your CRM page is not supported and I strongly recommend that you revert them.

And to answer your question, there is a native integration between Dynamics CRM and SharePoint.
Please refer to:

Also the trick of using accountidentity as folder name and using Iframes will not work. I suggest you first enable native integration and then update the account records accordingly so that they are linked with the right folders in SharePoint.

sunny-jAuthor Commented:
Thank you Chinmay for your comment. The link to our documents in this way has existed since 2008! And although it has worked fine with MOSS 2007 and CRM 2013, it would be great if document management could be integrated properly now.  So can the integration work with CRM 2016 and Sharepoint 2016 for both contacts and accounts?

The structure of the folder in SharePoint is as follows for the contacts

 Shared Services Administration: SharedServices1 > CRMDocs > Contacts > CO21229_ContactName  
 and in this way for the accounts.

Shared Services Administration: SharedServices1 > CRMDocs > Accounts > 100105

Thank you for the links but any guidance on the steps involved in preparing the CRM for existing documents as well as ensuring the CRM auto creates a document repository for each new contact and account will be really helpful. Kind regards.
Chinmay PatelChief Technology NinjaCommented:
Hi Sunny,

The link I shared earlier has everything you need. You will have to read that topic throughly anyways if you intend to succeed with the migration,

With that said, I will answer the specific questions you have asked here.
1. Native integration can work with "Any" entity - as long as you have enabled Document Management for a given entity. See:

2. Out of the box, you will be able to select Entity based structure but it is in this format
 a. For the documents that you upload on the Account entity itself the format is: Account/AccountName_RECORD_GUID/
 b. If there is a contact associated with a given account and you upload documents in the context of that contact then it will be stored under this path: Account/AccountName_RECORD_GUID/Contact/Contact_RECORD_GUID (This is for related records) so you will have to update your documents location accordingly.

You can manipulate these locations using SDK or you can prepare your SharePoint content before the migration. In case you want to have a quick idea of how this integration is done, have a look at:

This link will help you to evaluate various Setup options.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sunny-jAuthor Commented:
thank you for your attention to this matter. Much appreciated.
Chinmay PatelChief Technology NinjaCommented:
No problem. Glad I could help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.