Print Reports from D365FO to Microsoft Teams

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.).

Change the way you are notified in Microsoft Teams

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).

Open your Microsoft Teams files in SharePoint Online

Documents in SharePoint represent a document library, as shown in the figure below.

Microsoft Teams storage in SharePoint Online

Even if a Teams channel is deleted, the files remain in SharePoint as a backup copy.

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.

Docentric AX Free Edition supports printing reports and storing them in SharePoint. Click here to download, install and get started.

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.

Configure SharePoint Site URL and Path to store files   Browse SharePoint and select the file destination path

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.

Docentric AX Free Edition can automatically create the missing folder structure in SharePoint. If you want to use this feature, please enable the Create non-existing subfolders option.

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:

Azure Logic App workflow steps to notify Microsoft Teams members

To see the expanded workflow steps click here, or you can download the complete Logic App JSON template file and get the expressions used in the 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.

Notification received in MS Teams   Posted message with preview and link to a newly added file stored on SharePoint

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 achieve other scenarios this way by using Docentric’s powerful SharePoint integration features in D365FO. Once you are in the cloud and you use Azure Logic Apps, the sky is the limit.

And suppose you have similar advanced scenarios and need to use the structured metadata from D365FO in the Logic App, the Save D365FO reports to SharePoint with metadata fields article is the next one you might want to check.

Don’t forget to download and install Docentric AX Free Edition and see everything described in this article in action.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>