In this blog article, you will learn how the DocumentsCorePack ServerBased functionality can be used to save generated documents to a specified SharePoint URL in a workflow. More information about how to create a workflow can be found here. We will skip this part and focus on the step which saves the generated documents to SharePoint.
Therefore, we have to create a new MSCRM-ADDONS.com AutoMergeWorkingItems, which makes sure that the generated document will be saved to a specified SharePoint URL. To do so, please add a new step to your workflow and set click on the [Set Properties]-button. The properties for this step could look like in the example below:
Type in the name of your newly created step – a name that reminds you of what it contains. In this case “Save File to SharePoint” makes sense.
Open the drop-down menu and select CreateDocument. Select this option to create a document in any Microsoft Dynamics 365 standard and/or custom entity.
Insert the PrimaryRecordUrl here by using the Form Assistant on the right side (highlighted in yellow). A description of how to set a PrymaryRecordsUrl-field can be found in this blog article.
Open the Look up-record and select the template which should be executed.
❺ SharePoint URL
Insert here your SharePoint URL, which can be dynamic or static.
If you want to specify a folder, the url has to end with a ‘/’. eg. https://xyz.sharepoint.com/sites/dcp/account/
If you want to specify a folder and a file name then you type the full url with the filename, but without extension into this field. eg. https;//xyz.sharepoint.com/sites/dcp/account/myfilename
Select the direction of your SharePoint service here. In this case “Entity to SharePoint” because we want to save a generated document based on an entity to SharePoint.
After defining the properties please save your newly created process and do not forget to activate it in the My Processes-section by hitting the [Activate]-button in the command bar.
Please also have a look at this blog article to learn how to upload a SharePoint document to an email.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to email@example.com.