SharePoint Document Library
Microsoft Dynamics CRM support integration with SharePoint that enables you to use the document management capabilities of SharePoint from within Microsoft Dynamic CRM. Adxstudio Portals 7 now supports uploading and displaying documents to and from SharePoint directly on an Entity Form or Web Form in the portal.
If the form is readonly then the documents will be visible but new documents cannot be uploaded.
Complete the following steps to enable documents to be stored in SharePoint from a form in your portal. These instructions assume you have an existing SharePoint environment that is operational.
- Enable document management on entities. Please refer to the following documentation provided by Microsoft. http://msdn.microsoft.com/en-us/library/gg334633.aspx
- Edit your portal's web.config file and add a connectionString for your SharePoint environment. Refer to SharePoint Connection String for complete details.
- Add the Document Locations sub-grid to an entity's form in the CRM web client.
- Login to CRM with a user that has the System Administrator or System Customizer role
- Navigate to Settings -> Customizations -> Customize the System
- Expand Entities
- Select the entity
- Under the Communication & Collaboration section, check Document Management
- Click Save
- Click Forms
- Click New or Double Click an existing form to edit
- Click Insert tab
- Click Sub-Grid
- Specify a Name
- Under Data Source, select the Entity titled Document Locations (Regarding)
- Select the Default View titled Active Document Locations
- Click Set
- Click Save
- Click Publish
If you already have an Entity Form, Web Form, or Managed Form that references this entity's form then the SharePoint document library files will be rendered on the form for edit or readonly forms as well as a control to upload a file that will be displayed for insert forms as well. Documents will be stored within SharePoint.
Setting up correct Entity Permissions are required to display forms that contain SharePoint document sub-grids. Start by editing the Entity Form or Web Form Step to Enable Entity Permissions which is the minimum to read documents. To allow document uploads, set the mode to Edit and enable Allow Create If Null. The following example enables permissions on an entity form associated to webpage entities.
Two entity permission records are required to establish the necessary access to view and upload documents.
- Permissions on the entity of the Entity/Web Form
- Permissions on the SharePoint Document Location with Parent scope refering to the previous permission record
Create an Entity Permission record specifying the Entity/Web Form entity for the Entity Name. Select a scope and scope relationship that is appropriate to the desired behavior of the form. Enable Read and Append To privileges to allow read access to documents and optionally enable Write privilege to allow document uploads. Ignore the Child Entity Permissions section for now since it will be populated by the next step. The completed entity permission looks like this:
Create an Entity Permission record specifying the Document Location entity with Parent scope. Select the Regarding relationship for the Parent Scope Relationship and point the Parent Entity Permission lookup to the previous entity permission record (this populates the Child Entity Permissions of the previous record). The minimum privileges to allow read access to documents are Read, Create, and Append. Include Write for document upload access.