I have a custom entity and integrated it with Sharepoint. I will be creating these records using web API. How can I add documents to SharePoint via API?
I have a custom entity and integrated it with Sharepoint. I will be creating these records using web API. How can I add documents to SharePoint via API?
Hi Arif,
I am actually in need of a solution like this.
Do you mind sharing the web API calls made? I wanna see the conversion of docs in your code and all?
Thanks
SOLVED!
Thank you for all your messages.
I solved my own question. Let's explain how I did.
I did a bit search on Dynamics API and found this entity:"sharepointdocumentlocations"
And I made a GET request and it returns an attribute which is called "relativeURL"
I saw that its value is: "_relatedRecordGuid". It always starts with underscore.
And also I found that all files uploaded from Dynamics UI to sharepoint is under that folder.(If Dynamics record is different, than new folder created with "_newRecordGuid" and files uploaded under this folder.)
I thought that I can create a new folder under my entity folder in SharePoint using SharePoint API. And I did.
For example if the records guid is like below;
createdRecordGuid="123asd123qwexxcv123..."
I created folder which is called "_createdRecordGuid" under "entityname folder"(In my situation, it was "rd_jobapplication")
so created Folders path is like: ("rd_jobapplication/_" + createdRecordGuid.upper()) //Folder names are UPPERCASE
And I uploaded the file under this path.
It solved my problem. Now I can see uploaded files using API, under the related record.
Thanks.
Hi,
Thank you for your query.
Please look into this:
https://www.briteglobal.com/blogs/community/dynamics-365-sharepoint-online-integration-webapi/
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,321
Most Valuable Professional
nmaenpaa
101,156