Tag Archives: sharepoint
How to create a SharePoint site and enable Server-Based SharePoint Integration for Document Management System in D365 CRM
What is a SharePoint site? Sharepoint site is an application which is provided by Microsoft which can be used to store information and content. This may include documents, images videos, tasks, and so many things. For more details please follow the link Steps to create a site and integrate your SharePoint with D365 CRM Step 1: Log in to Office 365 login and open SharePoint. Step 2: Once you click on Sharepoint, go onto the Home icon and click on +Create site. Step 3: Click on Team site. My requirement is to track my project status and to share team resources and co-author content. So that’s why I select the Team site. Step 4: Enter your details for your new site and once done, click on Next. Step 5: You can also add specific members for your site(not necessary). Once done click on Finish. Step 6: Once you click on Finish, it will redirect it to your site which you created. Just copy the above link of your site which I highlighted. Just copy the link to your site. It will be used later. Step 7: Go into Dynamics 365 CRM and login in with your credentials OR mention your URL for e.g. abcde.crm.dynamics.com and then login. Once done, click on the ellipses(3 dots) and select Advanced Settings. Step 8: Drop down the Settings icon and click on Document Management. Step 9: Click on Enable Server-Based Sharepoint Integration. Step 10: In simple terms, what we are doing is integrating and validating the configuration of SharePoint. Click on Next. Step 11: Select Online and then click on Next. Step 12: Enter the URL I previously asked to copy and paste(In Step 6). Paste that link here and click on Next. In the Next Step, it will validate that site. After that click on Finish and wait for 3-4 mins. Step 13: After Refreshing you will observe that Enable Server-Based Sharepoint Integration section has changed to One Note Integration. This means that your SharePoint has been enabled and what’s remaining is to add the entities which need to be stored in Sharepoint. Step 14: In Order to do that, click on Document Management Settings. Step 15: Select the entities which you want to enable for the Document Management System. Step 16: If you want a folder structure based on a certain entity you can check the option Based on entity and select the entity you want. Step 17: Click OK to continue. Step 18: FYI the status is showing me cancelled since I have already created the document management system for these selected entities previously. In your case, the status will show completed if you are doing it for the first time. Step 19: Go onto your SharePoint site and click on Site contents Step 20: Here you can view all the entities which were selected for the Document Management System. Hope this Helps!!!
Restricted View Permission is not Visible in SharePoint Permissions
I created a SharePoint site and was working on user permissions for a document library, I wanted to assign the Restricted View permission to a group but the permission was not visible. Below is the screenshot of the document library I created in my SharePoint and as you can see the Restricted View Permission is not available in the permission list. So how to make the permission available, the catch here is that it is only visible if there is a document uploaded in the document library (So you can upload a dummy document to your library and later delete it). Hope this helps!
Count Number of files in SharePoint folder
Introduction: This blog explains how to Count No of files in SharePoint folder using MS Flow. Steps to be followed: Select “Send an HTTP request to SharePoint” from Actions. Enter below details:Site Address: Select the site address from the list. Method: GETUri: _api/web/GetFolderByServerRelativeUrl(‘LibraryTitle/foldername’)/ItemCountExample: _api/web/GetFolderByServerRelativeUrl(‘account/CFS Organization_584732FD1267E911A997000D3AA2C8D1‘)/ItemCount-> It will count the no of files in “CFS Organization_584732FD1267E911A997000D3AA2C8D1” folder. Output of above request: Accessing value of ItemCount: Add Compose Action. Add below expression in Inputs: body(‘Send_an_HTTP_request_to_SharePoint_’)[‘d’][‘ItemCount’]
Create SharePoint Folder using POST request in MS Flows
Introduction: This blog explains how to create folders in SharePoint when new record is created in D365 CE. Use Case: When new account is created in D365 CE create “Contact Documents” and “Documents” folders in SharePoint. Pre-Requisites: D365 CE SharePoint Online Microsoft Flow Steps to be followed: Sign in to the Microsoft flow. https://flow.microsoft.com/en-us/ Go to My flows -> “+New”-> “+Automated-from blank” 3. Select “When a record is created” trigger and click on create. 4. Select “Organization Name” and “Entity Name”. 5. Click on “+New Step” and select “Compose” Action. 6. a. Add “Account Name” from Dynamics Content in Input. b. Add underscore “_” c. Click on Expression enter below formula: toUpper(replace(triggerBody()?[‘accountid’],’-‘,”)) d. Compose should look like below: 7. Now we will create “Main folder in SharePoint” for this account. 8. Click on “+New step” and select “Send an HTTP request to SharePoint” Action. 9. Enter below details: Site Address: Select the site address from the list. Method: POST Uri: _api/Web/GetFolderByServerRelativeUrl(‘account/Output of Compose‘)/Folders Headers: Content-Type application/json;odata=verbose Accept application/json;odata=verbose Body: { ‘__metadata’: { ‘type’: ‘SP.Folder’ }, ‘ServerRelativeUrl’:’account/ Output of Compose‘} 10. Now we will create sub folders inside the main folder. 11. Click on “+New step” and select “Send an HTTP request to SharePoint” Action. 12. Enter below details: Site Address: Select the site address from the list. Method: POST Uri: _api/Web/GetFolderByServerRelativeUrl(‘account/Output of Compose/Contact Documents‘)/Folders Headers: Content-Type application/json;odata=verbose Accept application/json;odata=verbose Body: { ‘__metadata’: { ‘type’: ‘SP.Folder’ }, ‘ServerRelativeUrl’:’account/ Output of Compose/Contact Documents‘} NOTE: “Contact Documents” is the sub folder which we want to create in main folder. 13. Repeat “step no 12” to create “Documents” folders. Uri: _api/Web/GetFolderByServerRelativeUrl(‘account/Output of Compose/ Documents‘)/Folders Body: { ‘__metadata’: { ‘type’: ‘SP.Folder’ }, ‘ServerRelativeUrl’:’account/ Output of Compose/ Documents‘} NOTE: “Documents” is the sub folder which we want to create in main folder. Complete Flow: Testing Flow Create new account record in D365 CE. Check Documents in SharePoint.
User Privileges on SharePoint – D365 Document Integration
Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something like this – That’s when you wonder if all the privileges in D365 Security Roles for SharePoint Site or Document entity are correct or not? In fact, it’s the SharePoint privileges that you must look into. Privileges On SharePoint: Even if the error indicates that you don’t have access in D365, it is actually the SharePoint site that’s missing permissions. Here’ where you need to check for the O365 User’s SharePoint privileges: Navigate to SharePoint Admin Center in the Office 365 Admin center Next, in any of the intended SharePoint sites, navigate to the Gear Icon and then Site Settings. In Site Settings, navigate to People and groups under Users and Permissions area. Check that you might not have the intended user in that list. You can then click on Add and add the user in the list. You can either add an individual user or ‘Everyone Except external users’. and confirm that you see them in the list now. Confirm Permissions: Now, you can ask the users to check and they should be good to go. Hope this helps!