9,400
edits
Line 92: | Line 92: | ||
* Document headers are stored in the database entity resco_sharepointdoc. Each record describes one document - its file name, path, size... but mainly the lookup to the owning CRM record (resco_regardingid). | * Document headers are stored in the database entity resco_sharepointdoc. Each record describes one document - its file name, path, size... but mainly the lookup to the owning CRM record (resco_regardingid). | ||
* Document bodies are stored separately in the blob storage. | * Document bodies are stored separately in the blob storage. | ||
=== SharePoint specifics === | |||
SharePoint is organized via sites and lists. Resco mobile apps synchronize with specific SharePoint lists - document libraries. | |||
* Each document location represents a subfolder of some document library. | |||
* Documents represent document library list items. | |||
In the Dynamics CRM world, Resco relies on existing Dynamics SharePoint integration consisting of two entities: | |||
* sharepointsite - lists SP sites used in the integration | |||
* sharepointdocumentlocation - Lists document locations, i.e. folders of document libraries and their corresponding CRM records. | |||
In the standard integration, CRM admin selects entities (account, contact…) that can have SharePoint attachments. In turn, respective SharePoint document libraries are created: One library per one entity with the library names identical to the entity names. | |||
Resco mobile apps sync first these two above-mentioned entities (as part of the standard sync) and then use them to control communication with SharePoint. | |||
If you want to use SharePoint storage for other platforms (Resco Cloud or Salesforce), Woodford admin needs to define these tables manually. At the minimum, the sharepointsite table must have a single record pointing to a suitable SharePoint site; document locations are created by Resco apps when needed. | |||
Resco apps support 3 alternative ways of SharePoint communication: | |||
* The oldest ListService interface is used by default. Needs extra API calls to obtain necessary info about document libraries. (GetListCollection does not return root folders.) | |||
* Enable the '''SharePoint REST API''' configuration setting to use ListService partially using REST API. This interface is more efficient than the first because it does not need GetList API calls. | |||
* Enable '''New SharePoint REST API''' configuration setting to use the full REST API. It is just as efficient at the second option. Additionally, it uses the OAuth authorization, with a single sign-on with Dynamics possible. | |||
=== Document synchronization === | === Document synchronization === |