{"id":17348,"date":"2019-02-27T05:39:59","date_gmt":"2019-02-27T05:39:59","guid":{"rendered":"https:\/\/www.bridge-global.com\/blog\/blog\/?p=17348"},"modified":"2019-02-28T03:37:35","modified_gmt":"2019-02-28T03:37:35","slug":"generate-pdf-attachments-in-dynamics-365-using-microsoft-flows","status":"publish","type":"post","link":"https:\/\/www.bridge-global.com\/blog\/generate-pdf-attachments-in-dynamics-365-using-microsoft-flows\/","title":{"rendered":"Generate PDF Attachments in Dynamics 365 Using Microsoft Flow"},"content":{"rendered":"<p>When we need to generate a PDF in <a href=\"https:\/\/www.bridge-global.com\/services\/custom-software-development\/microsoft-development\/microsoft-dynamics365-power-bi-services\" rel=\"noopener\" target=\"_blank\">Microsoft Dynamics 365<\/a>, for example, a quote or invoice, we generally have two choices: <\/p>\n<p>1. Either, automate it using a third-party add-on<br \/>\n2. Or, manually convert to PDF using a word template <\/p>\n<p>But, we have another easy solution that helps us to generate PDF attachments. <a href=\"https:\/\/flow.microsoft.com\/en-us\/\" rel=\"noopener\" target=\"_blank\">Microsoft Flow<\/a> helps us to get the work done without coding by following the below steps.<\/p>\n<p><strong>1.   \t<em>Add an on-demand workflow that runs on a quote and generates a word document.<\/em><\/strong><br \/>\n2.   \t<strong><em>Develop a flow that fires of the creation of a note record and does the PDF conversion and attaches the note record back against the original record.<\/em><\/strong><\/p>\n<p>I will explain these using an example, say a quote and a quote summary.<\/p>\n<p><strong><\/p>\n<h5>On-demand workflow to generate a word document<\/h5>\n<p><\/strong><\/p>\n<p>Using the standard out of the box functionality, add an on-demand workflow. Dynamics 365 also has an out of the box action which we can make use of. Here we use the action &#8216;SetWordTemplate&#8217;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-1.png\" alt=\"\" width=\"869\" height=\"377\" class=\"aligncenter size-full wp-image-17349\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-1.png 869w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-1-300x130.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-1-768x333.png 768w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-1-500x217.png 500w\" sizes=\"auto, (max-width: 869px) 100vw, 869px\" \/><\/p>\n<p>We have to add the action &#8216;SetWordTemplate&#8217;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-2.png\" alt=\"\" width=\"579\" height=\"123\" class=\"aligncenter size-full wp-image-17354\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-2.png 579w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-2-300x64.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-2-500x106.png 500w\" sizes=\"auto, (max-width: 579px) 100vw, 579px\" \/><\/p>\n<p>In properties, select the template.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-3.png\" alt=\"\" width=\"641\" height=\"185\" class=\"aligncenter size-full wp-image-17355\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-3.png 641w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-3-300x87.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-3-500x144.png 500w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><\/p>\n<p>This workflow will be available on demand and when we run this, a docx quote summary will be generated as an attachment in the quote.<\/p>\n<p> <strong><\/p>\n<h5>Create a Flow for PDF conversions<\/h5>\n<p><\/strong><\/p>\n<p>We have to create a flow that is triggered by the creation of a note record. We also have to check if the regarding is quote and has document attachment. The whole steps to create a flow is given below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-4.png\" alt=\"\" width=\"624\" height=\"154\" class=\"aligncenter size-full wp-image-17357\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-4.png 624w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-4-300x74.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-4-500x123.png 500w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-5.png\" alt=\"\" width=\"623\" height=\"153\" class=\"aligncenter size-full wp-image-17358\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-5.png 623w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-5-300x74.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-5-500x123.png 500w\" sizes=\"auto, (max-width: 623px) 100vw, 623px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-6.png\" alt=\"\" width=\"615\" height=\"204\" class=\"aligncenter size-full wp-image-17359\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-6.png 615w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-6-300x100.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-6-500x166.png 500w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-7.png\" alt=\"\" width=\"615\" height=\"225\" class=\"aligncenter size-full wp-image-17360\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-7.png 615w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-7-300x110.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-7-500x183.png 500w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-8.png\" alt=\"\" width=\"615\" height=\"183\" class=\"aligncenter size-full wp-image-17361\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-8.png 615w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-8-300x89.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-8-500x149.png 500w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-9.png\" alt=\"\" width=\"618\" height=\"307\" class=\"aligncenter size-full wp-image-17362\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-9.png 618w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-9-300x149.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-9-500x248.png 500w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-10.png\" alt=\"\" width=\"618\" height=\"211\" class=\"aligncenter size-full wp-image-17364\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-10.png 618w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-10-300x102.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-10-500x171.png 500w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-11.png\" alt=\"\" width=\"606\" height=\"147\" class=\"aligncenter size-full wp-image-17365\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-11.png 606w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-11-300x73.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/haris-blog-11-500x121.png 500w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-12.png\" alt=\"\" width=\"625\" height=\"556\" class=\"aligncenter size-full wp-image-17367\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-12.png 625w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-12-300x267.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/Haris-blog-12-337x300.png 337w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p><strong>Conclusion <\/strong><\/p>\n<p>Though there are a lot of out-of-the-box functionalities in Dynamics 365 that benefit our requirements, some functionalities like saving\/converting a word document to PDF manually remains outside the box. Microsoft Flow comes as an ideal solution in this context. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>When we need to generate a PDF in Microsoft Dynamics 365, for example, a quote or invoice, we generally have two choices: 1. Either, automate it using a third-party add-on 2. Or, manually convert to PDF using a word template &hellip;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":107,"featured_media":17411,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-17348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"featured_image_src":"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/02\/WorkLessDoMore.jpg","author_info":{"display_name":"Muhammed Haris","author_link":"https:\/\/www.bridge-global.com\/blog\/author\/muhammed-haris\/"},"_links":{"self":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/17348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/users\/107"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/comments?post=17348"}],"version-history":[{"count":9,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/17348\/revisions"}],"predecessor-version":[{"id":17573,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/17348\/revisions\/17573"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/media\/17411"}],"wp:attachment":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/media?parent=17348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/categories?post=17348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/tags?post=17348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}