Posts

Showing posts with the label DocuRef

Create and add to a blob storage in MSDyn365FO

Image
This post shows how you can create a Azure blob storage and add files using your Azure storage account from D365FO. I have created a job that finds an attachment on a sales order and uploads it to the Azure blob storage just to show how a simple scenario could work. To begin with, you will need to create your storage account. You can have a look at this article on how to create a blob storage account: Create a storage account Once you have created a storage account you will need the connection string. See below: Next thing is the job. I’ve pasted screenshots below: Once you run the above job and file upload is successful. You’ll find a container named ‘mycontainer’ inside your Azure blob storage and a document that you would have attached on the Sales order record.

Printing PDF Attachments in MSDyn365FO

Image
In this post I’ll detail how you can print PDF document attachments using AXs DocumentContract framework. I have used this forum post as a reference: https://community.dynamics.com/ax/f/33/p/222925/785091#785091 1. Create extension of the DocuView form to introduce a new Print button. 2. Next thing is to create a handler class that will have all our event handlers. a. Firstly, we create a class with the reference to DocumentContract AX framework. In my case, I am also using Reporting framework. b. Let’s subscribe to the OnActivated event of the main DataSource which is DocuRef. This is so we can enable or disable printing by checking if the reference is a document and is of type ‘pdf’ c. Then we can create subscribe to the OnClicked event of the new button Print button. We will write our printing logic here. d. Once you click print, you’ll get the following message and you have managed to successfully print an attachment: