{"id":1049,"date":"2023-02-10T10:53:08","date_gmt":"2023-02-10T09:53:08","guid":{"rendered":"https:\/\/dynamiacs.com\/?p=1049"},"modified":"2023-02-11T18:15:00","modified_gmt":"2023-02-11T17:15:00","slug":"transfer-of-a-deep-link-from-fo-to-crm","status":"publish","type":"post","link":"https:\/\/dynamiacs.com\/?p=1049","title":{"rendered":"Transfer of a deep link from FO to CRM"},"content":{"rendered":"\n<p>Everyone knows it, if you want to quickly jump from the sales order in Dynamics 365 Sales to the sales order in Dynamics 365 Supply Chain Management, you need quite a few clicks.<\/p>\n\n\n\n<p>With the following small low code \/ now code development we manage this in one click.<\/p>\n\n\n\n<p>For this we use the link to the data set generated in Dynamics 365 Supply Chain Management.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.23.14-1024x657.png\" alt=\"\" class=\"wp-image-1060\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.23.14-1024x657.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.23.14-300x192.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.23.14-768x493.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.23.14-1536x986.png 1536w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.23.14-2048x1314.png 2048w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.23.14-1600x1027.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To implement this, the following steps must be performed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">New field in Dataverse<\/h3>\n\n\n\n<p>First, we need an appropriate field in Dynamics 365 Sales where we can store the link from Dynamics 365 Supply Chain Management.<br>To do this, we create a new field of type &#8220;URL&#8221; in Dataverse in the table &#8220;Order&#8221;.<br>It is important to note that the maximum number of allowed characters must be increased, since the link consists of over 1000 characters.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-1-1024x657.png\" alt=\"\" class=\"wp-image-1051\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-1-1024x657.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-1-300x192.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-1-768x493.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-1-1536x986.png 1536w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-1-2048x1314.png 2048w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-1-1600x1027.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><br>Next, we need to make the field visible on the form so that we can use the link.<br>To do this, we change the corresponding form in the &#8220;Order&#8221; table and insert the URL field there and set it to &#8220;Read only&#8221; in the properties.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-2-1024x657.png\" alt=\"\" class=\"wp-image-1052\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-2-1024x657.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-2-300x192.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-2-768x493.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-2-1536x986.png 1536w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-2-2048x1314.png 2048w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-2-1600x1027.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Alert rule in Dynamics 365 Supply Chain Management<\/h3>\n\n\n\n<p>Now, to populate this field, we create a warning rule on the Sales Order in Dynamics 365 Supply Chain Management that responds whenever a new sales order is created.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.26.22-1024x657.png\" alt=\"\" class=\"wp-image-1061\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.26.22-1024x657.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.26.22-300x192.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.26.22-768x493.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.26.22-1536x986.png 1536w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.26.22-2048x1314.png 2048w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/Bildschirm\u00adfoto-2023-02-10-um-07.26.22-1600x1027.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This warning rule is passed externally via the business events to Power Automaten, where we then set the appropriate steps to provide the dataset in the dataverse (=CE) with the FO link.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create workflow<\/h3>\n\n\n\n<p>Now comes the final step, we create a workflow in Power Automate that updates the URL field on the Sales Order record in Dynamics 365 Sales whenever a new sales order is created.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"904\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-4-1024x904.png\" alt=\"\" class=\"wp-image-1054\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-4-1024x904.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-4-300x265.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-4-768x678.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-4.png 1294w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>For this purpose we use the automatic trigger &#8220;When an event occurs&#8221; of the connector &#8220;Dynamics 365 Fin &amp; Ops&#8221; .<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"380\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-5-1024x380.png\" alt=\"\" class=\"wp-image-1055\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-5-1024x380.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-5-300x111.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-5-768x285.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-5.png 1260w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This workflow now responds to the business event &#8220;When an alert rule is triggered&#8221; and starts the workflow.<br>The next step is to make the content from the trigger more &#8220;readable&#8221; by converting the content into a JSON format.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"567\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-6-1024x567.png\" alt=\"\" class=\"wp-image-1056\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-6-1024x567.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-6-300x166.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-6-768x425.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-6.png 1260w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now we can use the data to perform the last step in Dataverse. To do this, we first search for the corresponding record in Dataverse, since we need the Dataverse Unique Id for the update step.<br><br>D To do this, we filter out from the Order table the records that have corresponding order number passed by the warning rule as &#8220;Key 1&#8221;.<\/p>\n\n\n\n<p>Thus, we have the appropriate information to now update the &#8220;FO LINK&#8221; field on the record.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"813\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-7-1024x813.png\" alt=\"\" class=\"wp-image-1057\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-7-1024x813.png 1024w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-7-300x238.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-7-768x609.png 768w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-7.png 1298w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"112\" src=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-8.png\" alt=\"\" class=\"wp-image-1058\" srcset=\"https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-8.png 880w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-8-300x38.png 300w, https:\/\/dynamiacs.com\/wp-content\/uploads\/2023\/02\/image-8-768x98.png 768w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/figure>\n\n\n\n<p><br>It is important to note here that &#8220;&amp;pageType=Details&amp;prt=initital&#8221; is appended to the end of the URL so that the detail view also opens.<\/p>\n\n\n\n<p>That&#8217;s it now, we just need to make sure that the Changed based Alerts job in Dynamics 365 Supply Chain Management runs regularly. During testing, we set the job to run every minute.<\/p>\n\n\n\n<p>Hope this helps you.<\/p>\n\n\n\n<p>P.S.:<br>This is only exemplary and was tested in a test environment. For productive use, please revise and test accordingly.<br>Any damage is not taken from, as here is explicitly pointed out a possible solution idea.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Everyone knows it, if you want to quickly jump from the sales order in Dynamics 365 Sales to the sales order in Dynamics 365 Supply Chain Management, you need quite a few clicks. With the following small low code \/ now code development we manage this in one click. For this we use the link&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","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,51],"class_list":["post-1049","post","type-post","status-publish","format-standard","hentry","category-blog","tag-dynamics-365","tag-powerautomate"],"taxonomy_info":{"category":[{"value":8,"label":"Blog"}],"post_tag":[{"value":11,"label":"Dynamics 365"},{"value":51,"label":"PowerAutomate"}]},"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":51,"name":"PowerAutomate","slug":"powerautomate","term_group":0,"term_taxonomy_id":51,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/1049","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=1049"}],"version-history":[{"count":3,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/1049\/revisions"}],"predecessor-version":[{"id":1064,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=\/wp\/v2\/posts\/1049\/revisions\/1064"}],"wp:attachment":[{"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dynamiacs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}