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)

CRM Online + SharePoint Online + FetchXML?

(1) ShareShare
ReportReport
Posted on by

Hi everyone,

We have a couple of clients that will be going with CRM Online and we want to use SharePoint Online for their document management/storage. Integration is easy and works well. My issue is that both clients require SSRS reports that will involve referencing the documents they are storing. Currently, with CRM On-Prem and using it's Notes facility, this is simple. Everything required can be retrieved with a FetchXML call, and can be used in SSRS directly.

My issue is there seems to be no way to query the SharePoint documents using FetchXML. I have tried with both CRM On-Prem and Online, and doing an advanced search for anything related to the SharePoint docs other than their basic location results in an error: "SharePoint document entity does not support any view other than associated grid view".

Is there any advice concerning this? I would love to build a basic report that simply gets a list of Accounts, and any SharePoint documents associated with that Account. The FetchXML for getting the Accounts is easy:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="account">
    <attribute name="name" />
    <attribute name="primarycontactid" />
    <attribute name="telephone1" />
    <attribute name="accountid" />
    <order attribute="name" descending="false" />
  </entity>
</fetch>

Is there a way to query the SharePoint documents (ie: get their Names) from within a single FetchXML query?

Thank you so much!

Rick

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Bas van de Sande Profile Picture
    4,383 on at

    Hi Rick,

    unfortunately not.

    you have 3 entities within CRM:

    sharepointsite : contains all sites/libraries on which documents are stored

    sharepointdocumentlocation: contains the relative path (on folder level) to the document

    sharepointdocument:  not used in the standard integration (at least I've never seen it being used)

    You need to figure out another solution.

    Bas

  • Rick Towns Profile Picture
    on at

    Hi Bas,

    Thanks for that info! At least I can stop banging my head against the wall trying to make this work. Perhaps I can try combining a JQuery against SharePoint's XML feed? If I figure it out, I will post it here.

    Thanks again!

    Rick

  • Bas van de Sande Profile Picture
    4,383 on at

    Hi Rick,

    SharePoint offers a rich REST API. That is the way you should go to retrieve the documents

    check the reference over here:

    msdn.microsoft.com/.../dn292553.aspx

    On my blog, I already did a lot of research on connecting SharePoint and CRM

    Happy coding

  • Rick Towns Profile Picture
    on at

    Hi Bas,

    Yes, the REST API looks good, and may eventually be my solution. I am using Visual Studio 2012 with BIDS to create my .rdl file that I will eventually upload to CRM Online. My problem now is that regardless of whether I create a SharePoint List datasource, or an XML datasource (pointing to xxx.sharepoint.com/.../Account for example), I get authentication errors (ie: 403 Forbidden). I assume this is because SharePoint Online is using Claims Based authentication which isn't supported with the SSRS I am using. Why does Microsoft make this stuff so difficult? ;)

    If I can get this authentication issue figured out, I will try to use the LookUpSet function to combine my CRM and SharePoint datasources. I want to avoid coding a custom integration solution. It kind of defeats the purpose of storing information in SharePoint Online if it is not easy to report against from CRM Online.

    Thanks!

    Rick

  • Bas van de Sande Profile Picture
    4,383 on at

    Hi Rick,

    I already figured the authentication issue out. On my blog (also syndicated here) I posted a better SharePoint Connector. journeyintocrm.com/.../1152

    The code is written in C#, but might help you to solve your connection problems.

    You happen to be fluent in C#??

    Bas

  • Rick Towns Profile Picture
    on at

    Hi Bas,

    Yes, we do 95% of our development in C# here (the other 5% is VB for SSRS!). I will have a look at your post - thank you very much for the link! If I have to do a coded solution, I will - I was just trying to see if it could be done out of the box to simplify deployment.

    Thank you so much for your effort! I do appreciate it. :)

    Rick

  • Community Member Profile Picture
    on at

    Any solution ?

  • Rick Towns Profile Picture
    on at

    Unfortunately no. However, D365 is now out, and I plan on investigating to see if its support of SharePoint is better integrated.

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