SharePoint and CRM 2016 document integration

sunny-j
sunny-j used Ask the Experts™
on
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()
{
Xrm.Page.ui.tabs.get("Documents").setDisplayState('collapsed');
}


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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
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: https://msdn.microsoft.com/en-us/library/gg334768.aspx

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.

Regards,
Chinmay.

Author

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.
Chief Technology Ninja
Distinguished Expert 2018
Commented:
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: https://msdn.microsoft.com/en-us/library/gg334633.aspx

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: https://www.youtube.com/watch?v=k4MwmqMvM3s

This link will help you to evaluate various Setup options. https://technet.microsoft.com/en-us/library/dn531154.aspx

Regards,
Chinmay.

Author

Commented:
thank you for your attention to this matter. Much appreciated.
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
No problem. Glad I could help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial