{"id":107,"date":"2018-07-13T19:40:53","date_gmt":"2018-07-13T17:40:53","guid":{"rendered":"http:\/\/pro.timphaus.de\/?p=107"},"modified":"2020-12-18T10:37:00","modified_gmt":"2020-12-18T09:37:00","slug":"reminder-for-purchase-order-confirmation","status":"publish","type":"post","link":"https:\/\/dynamiacs.com\/?p=107","title":{"rendered":"Reminder for Purchase order confirmation"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Each company has the problem that they need a confirmed delivery date for a purchase order to plan the production or the sales delivery.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With\nMicrosoft Flow, Office 365 and Dynamics 365 for Finance and Operations since v8\nit is possible to do this with a small effort in setup and customizing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With\nD365FO Microsoft introduced the &#8220;custom fields&#8221;. These are fields\nthat can easily been created by a user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In my\nexample i created two of these fields:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>A Date\n     field which shows the date when a reminder for a confirmation is sent.<\/li><li>A checkbox to show that a\n     reminder is sent.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"375\" height=\"238\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_00.png\" alt=\"\" class=\"wp-image-108\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_00.png 375w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_00-300x190.png 300w\" sizes=\"auto, (max-width: 375px) 100vw, 375px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Thats all\nfor the needed setup in D365FO<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now we\nhave to setup Microsoft Flow to do automaticly the process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The\ntrigger is a daily scheduled run. In my example it runs every working day 08:00\nin the morning.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"192\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_01.png\" alt=\"\" class=\"wp-image-109\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_01.png 955w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_01-300x60.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_01-768x154.png 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The first\naction in the flow is to find the purchase orders where a confirmation on\nheader level is missing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To this\nwe will insert an action to get records for the Enitiy\n&#8220;PurchaseOrderHeadersV2&#8221;. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the\nFilter Query we will the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PurchaseOrderStatus eq\nMicrosoft.Dynamics.DataEntities.PurchStatus&#8217;Backorder&#8217; and\nConfirmedDeliveryDate eq 1900-01-01T12:00:00Z and PurchaseOrderNumber eq\n&#8216;00000180&#8217; and ConfRemind_Custom eq Microsoft.Dynamics.DataEntities.NoYes&#8217;no&#8217;\nand AccountingDate lt <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">addDays(utcNow(),-3)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><sub>addDays(&#8230;)<\/sub><sub>\u00d7<\/sub>\u200b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This\nquery means that we filter on the purchaseorder with status backorder:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PurchaseOrderStatus\neq Microsoft.Dynamics.DataEntities.PurchStatus&#8217;Backorder&#8217; <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;We also filter for a &#8220;blank&#8221;\nconfirmeddeliverydate. For this we have to use &#8220;1900-01-01.&#8221; because\nthis is the same as &#8220;blank&#8221; in this context.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ConfirmedDeliveryDate\neq 1900-01-01T12:00:00Z<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We also\nfilter for purchaseorders that has already processed in the reminder process:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ConfRemind_Custom\neq Microsoft.Dynamics.DataEntities.NoYes&#8217;no&#8217;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the\nlast part of the function we will filter on purchase order that are created a\nfew days ago and no on the last days.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AccountingDate lt\naddDays(utcNow(),-3)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"952\" height=\"753\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_02.png\" alt=\"\" class=\"wp-image-110\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_02.png 952w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_02-300x237.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_02-768x607.png 768w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After we\nhave find all purchaseorder which has to be reminded we will an apply to each\nsection for each purchase order.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1009\" height=\"882\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_03.png\" alt=\"\" class=\"wp-image-111\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_03.png 1009w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_03-300x262.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_03-768x671.png 768w\" sizes=\"auto, (max-width: 1009px) 100vw, 1009px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In this\nsection step is to find the lines that has to be confirmed by the vendor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here we\nuse also a get records action for D365FO. But here we use the Entity\nPurchaseOrderlinesV2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the\nfilter query we use the following filter to find the lines:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PurchaseOrderNumber\neq &#8216;[PO Number from the get PO Headers Step]&#8217; and PurchaseOrderLineStatus eq\nMicrosoft.Dynamics.DataEntities.PurchStatus&#8217;Backorder&#8217; and\nConfirmedDeliveryDate eq 1900-01-01T12:00:00Z<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First we\nhave to filter for the purchase order from the first action &#8220;find non\nconfirmed purchaseorder headers&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PurchaseOrderNumber eq &#8216;[PO Number from the get PO Headers Step]&#8217;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then we\nwill filter on lines that are in backorder status:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PurchaseOrderLineStatus eq\nMicrosoft.Dynamics.DataEntities.PurchStatus&#8217;Backorder&#8217;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The last\nfilter is to filter for lines where the confirmation date is &#8220;blank&#8221;:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ConfirmedDeliveryDate eq 1900-01-01T12:00:00Z<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"640\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_04.png\" alt=\"\" class=\"wp-image-112\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_04.png 953w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_04-300x201.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_04-768x516.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Next we\nwill do a small preparation for the layout of the email we will sent to our\nvendor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this\nwe will create a html table. Here you completly free in the design.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"664\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_05.png\" alt=\"\" class=\"wp-image-113\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_05.png 955w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_05-300x209.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_05-768x534.png 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Next step\nis to sent the email to the vendor. For this we use the email field from the\npurchase order head to identify the receiptant of the mail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the\nsubject I entered only &#8220;confirmation needed&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And in\nthe body i will insert the HTML Table from the step before. Here you can also\nadd more details or standard text.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"949\" height=\"819\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_06.png\" alt=\"\" class=\"wp-image-114\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_06.png 949w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_06-300x259.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_06-768x663.png 768w\" sizes=\"auto, (max-width: 949px) 100vw, 949px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The last\nstep is to set on the PurchaseOrder that you have sent an reminder and the\ndate.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"686\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_07.png\" alt=\"\" class=\"wp-image-115\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_07.png 961w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_07-300x214.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_07-768x548.png 768w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here you find the complete flow in one view.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"1024\" src=\"http:\/\/pro.timphaus.de\/wp-content\/uploads\/2019\/02\/PORemConf_08-901x1024.png\" alt=\"\" class=\"wp-image-116\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_08-901x1024.png 901w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_08-264x300.png 264w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_08-768x873.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2019\/02\/PORemConf_08.png 1023w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Each company has the problem that they need a confirmed delivery date for a purchase order to plan the production or the sales delivery. With Microsoft Flow, Office 365 and Dynamics 365 for Finance and Operations since v8 it is possible to do this with a small effort in setup and customizing. With D365FO Microsoft&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[8],"tags":[11,59],"class_list":["post-107","post","type-post","status-publish","format-standard","hentry","category-blog","tag-dynamics-365","tag-reminder"],"taxonomy_info":{"category":[{"value":8,"label":"Blog"}],"post_tag":[{"value":11,"label":"Dynamics 365"},{"value":59,"label":"Reminder"}]},"featured_image_src_large":false,"author_info":{"display_name":"Jan","author_link":"https:\/\/dynamiacs.com\/?author=2"},"comment_info":0,"category_info":[{"term_id":8,"name":"Blog","slug":"blog","term_group":0,"term_taxonomy_id":8,"taxonomy":"category","description":"","parent":0,"count":38,"filter":"raw","cat_ID":8,"category_count":38,"category_description":"","cat_name":"Blog","category_nicename":"blog","category_parent":0}],"tag_info":[{"term_id":11,"name":"Dynamics 365","slug":"dynamics-365","term_group":0,"term_taxonomy_id":11,"taxonomy":"post_tag","description":"","parent":0,"count":14,"filter":"raw"},{"term_id":59,"name":"Reminder","slug":"reminder","term_group":0,"term_taxonomy_id":59,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=107"}],"version-history":[{"count":2,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":129,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/107\/revisions\/129"}],"wp:attachment":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}