This article will show you how to print your reports from D365FO to Microsoft Teams and notify all the team members about the new document. To be more specific, we will use a simple scenario for a Project team.
Project management can be a challenging task. As you can imagine, project managers need to take care of time, materials, expenses, and of course, to collect documents. Therefore, for them it’s a great advantage being able to keep all related documents in one place but also being notified about new ones generated in D365FO.
Microsoft Teams Channels and Notifications
In Microsoft Teams, we can create several Project teams (so-called channels) to have all the communication related to the same project in the same channel (e.g., Docentric Projects Team in the figure below). We want to do the same for all the related business documents, store them in SharePoint and notify the project team about it. In order for MS Teams to notify the currently logged-in user, we need to define the Notification types for each channel properly (e.g., All activity, Posts, Replies, Mentions, etc.).
SharePoint’s Document Library for Microsoft Teams
Each Teams channel has its own Files folder located in the corresponding SharePoint location (Channel > Files > Open in SharePoint).
Documents in SharePoint represent a document library, as shown in the figure below.
Print Reports from D365FO to SharePoint
The project team can use SharePoint as a location to exchange documents. The same location can also be used by other related applications like D3635FO to store business documents (e.g., invoices, purchase orders, etc.). We can print the reports from D365FO in the specific project folder in SharePoint and create new subfolders by using Docentric print destinations.
Let’s now focus on configuring the Docentric File print destination to store generated reports to SharePoint. In the Print Destination Settings > File > Save to SharePoint, you can specify the Site URL and the Folder Path to the specific SharePoint document library folder (e.g., https://docentric.sharepoint.com/Sites/DocentricProjects),
where the reports of a specific Project Team will be saved. You can also select the folder (in the Folder Selection window) to specify the path by clicking the browse option.
To store our business documents from D365FO in the correct path in SharePoint and define the Folder path dynamically, we can use Placeholders. We can think of placeholders as variables that are replaced with an actual value from the related report data source when the report is sent via the Docentric print destination.
In this example, we are use the Sales Invoice report. It makes sense to use the following Folder path configuration with placeholders “Documents/Project @invoiceaccounting@ @invoicingname@/Sales Invoice“. More about placeholders can be found here.
Create Automatic Notifications in Microsoft Teams
As you can imagine, SharePoint and MS Teams are two separate cloud services. They are integrated in a way that you can see the files stored on SharePoint in MS Teams. To notify all channel members, we need to set a hook in the SharePoint pipeline and send the notification only when a new file is created in a specific location. There are multiple ways to achieve such a scenario. You can create a flow in Power Automate or create an Azure Logic App. Both ways allow you to create background operations on the SharePoint document library and perform automatic actions.
In this article, we have created a simple Azure Logic App to send notifications back to the MS Teams channel with the following steps:
Once our Logic App is created and enabled, users will receive a notification in the corresponding channel when a new document is added to the SharePoint library.
Final thoughts
With the simple steps described in this article, you can organize your project documents transparently and keep your project team updated. Of course, you can also achieve other various scenarios by using Docentric’s SharePoint integration features in D365FO. Once you are in the cloud and you use Azure Logic Apps, the sky is the limit.
And if you need to use the structured metadata from D365FO in a Logic App, the Save D365FO reports to SharePoint with metadata fields article is the next one you might want to check.