Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Issue Displaying Contents of SharePoint Document Library in Virtual Entity via Custom Data Provider.

(0) ShareShare
ReportReport
Posted on by 1,583

I am trying to ingest the contents of a SharePoint Online (365) Document Library into D365 Customer Service entity using a Virtual Entity and Custom Data Source.

 

For the purposes of this question, the SharePoint Online (365) Library need to use sits at myredacteddomain.com/.../

 

To prep, I wanted to access something quick and easy to “prove” this works and was able to create a custom ODATA V4 Provider that points to a public SQL Table used for testing purposes. http://services.odata.org/V4/OData/OData.svc

 CDProv1.png

The ODATA Service URL to the public data source returns the following tables/lists.

Screen-Shot-2019_2D00_12_2D00_10-at-3.33.04-PM.png

Specifically, I took the Advertisement list which has three fields, a GUID Field named ID, a Name field named Name, and a Date Field named AirDate. Appending the list name onto the ODATA Service URL as shown à https://services.odata.org/V4/OData/OData.svc/Advertisements returns the contents of the Advertisements table as shown below.  

Screen-Shot-2019_2D00_12_2D00_10-at-3.35.52-PM.png

The next step was to create the custom data provider to enable access to this data in D365.

I named the custom data provider PublicService and set the URL to http://services.odata.org/V4/OData/OData.svc

 ODATA1.png

I was then able to create and configure a Virtual Entity (shown below) for the Advertisements table.

 

The Virtual Entity (shown below) must have an external name and external collection name that correspond to the table in the external ODATA URL which in this case is Advertisements.

Screen-Shot-2019_2D00_12_2D00_10-at-3.45.52-PM.png

The Virtual Entity must also have three fields that are mapped to and correspond with the columns in the Advertisements table via the ODATA URL http://services.odata.org/V4/OData/OData.svc which are ID, Name, and AirDate

 

Screen-Shot-2019_2D00_12_2D00_10-at-3.49.58-PM.png

I successfully mapped the three fields to the virtual entity as shown in the example below.

 

Here is the one for ID

Screen-Shot-2019_2D00_12_2D00_10-at-3.50.36-PM.png

Here is the one for Name

Screen-Shot-2019_2D00_12_2D00_10-at-3.53.04-PM.png

Here is the one for AirDate

AirDate.png

After creating the Virtual Entity and performing the configuration steps shown above, I then go to the Advertisement entity I just created in D365 and I see the following data. Great right? Yes. But not what I need. I need SharePoint Data, and that’s where I am running into a brick wall.

 Screen-Shot-2019_2D00_12_2D00_10-at-3.55.33-PM.png

I know I am doing something wrong with respect to reproducing and adapting the steps above to ingest a SharePoint Document Library into D365 and I need a little help.

 

My goal is that someone reading this can easily identify what I am doing wrong or not doing and can then show me the exact error of my ways so that I can make the appropriate adjustments to display the data I need to display.

 

As I mentioned at the start of this document, the SharePoint Online (365) Library I need to use sits at https://myredacteddomain.com/sites/redacted/RedactedDev/

 

Inside of that SharePoint Online (365) sits a document library named AloyeTestDocLib as shown below and if I wish to access it directly via SharePoint URL, I can do so via à https://myredacteddomain.com/sites/redacted/RedactedDev/AloyeTestDocLib

 

Inside of the AloyeTestDocLib document library, sit two document records and several corresponding columns such as Name, ModifiedBy, and ModifiedOn.

Screen-Shot-2019_2D00_12_2D00_10-at-4.00.06-PM.png

I crafted the same ODATA URL but for SharePoint which is à https://myredacteddomain.com/sites/redacted/RedactedDev/_vti_bin/listdata.svc

 

When I enter that URL into my internet browser, I see numerous tables as shown below. I even see the AloyeTestDocLib table as the second item in that list, so it would appear I am good thus far. However, this is where my problems begin.

Screen-Shot-2019_2D00_12_2D00_10-at-4.13.54-PM.png

When I modify the ODATA URL to access the AloyeTestDocLib in the same manner as I have done in the first example which takes the form of https://myredacteddomain.com/sites/redacted/RedactedDev/_vti_bin/listdata.svc/AloyeTestDocLib , I encounter several problems.

 

     (1) Entering the URL results in a file open/save dialog box pops up as shown below.

Screen-Shot-2019_2D00_12_2D00_10-at-4.18.43-PM.png

     (2) Opening the file in the same internet browser shows the following, which I believe is the root of all my problems.

           There is no clean GUID Field – which is required to display the data in D365.

redactdata.png

      (3) I create the Custom Data Source as shown below.

Screen-Shot-2019_2D00_12_2D00_10-at-4.32.14-PM.png

      (4) Then I create the D365 Virtual Entity and label it appropriately. Note the External Name and External Collection Name.    

            How do I know if the External Name and External Collection Name I entered are correct given the strange/alternative format of the returned

            data shown on the previous page?

 Screen-Shot-2019_2D00_12_2D00_10-at-4.34.06-PM.png

      (5) For testing purposes, I will just try and use only the GUID and Name fields as shown below to keep it simple.

            I can add the others once I understand what I am doing with respect to dealing with SharePoint Data.

Screen-Shot-2019_2D00_12_2D00_10-at-4.35.45-PM.png

           For the GUID Field, what do I use?

Screen-Shot-2019_2D00_12_2D00_10-at-4.38.26-PM.png

         I don’t see any clear cut GUID field like what I saw in the SQL/Advertisement example.

redactdata.png

        Same goes for the D365 Name field.

name.png

       But at least I see a Name field in the retuned data.

namedata.png

       Obviously, without some kind of change, I am dead in the water.

finalerror.png

Any help, guidance, suggestions, resources, links to knowledge articles, or anything at all would be greatly appreciated!

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans