{"id":12715,"date":"2018-08-23T17:40:17","date_gmt":"2018-08-23T12:10:17","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=12715"},"modified":"2018-08-23T17:40:17","modified_gmt":"2018-08-23T12:10:17","slug":"execute-global-action-in-dynamics-365-v9-0-usingxrm-utility-invokeprocessaction","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2018\/08\/execute-global-action-in-dynamics-365-v9-0-usingxrm-utility-invokeprocessaction\/","title":{"rendered":"Execute Global Action in Dynamics 365 v9.0 Using\u201cXrm.Utility.invokeProcessAction\u201d"},"content":{"rendered":"<h2><strong>Introduction:<\/strong><\/h2>\n<p>In Dynamic 365 v9.0 we can use <strong>\u201c<\/strong><strong>Xrm.Utility.invokeProcessAction<\/strong><strong>\u201d<\/strong> to execute Global Action. When we need to create an Action to be executed on multiple entities, we can use Global Action in Dynamics 365.<\/p>\n<p>Here in the below example, we are cloning Account record by executing Global Action in Dynamic 365 v9.0.<\/p>\n<h2><strong>Create Global Action:<\/strong><\/h2>\n<p><strong>1.<\/strong> Go to <strong>Setting -&gt; Processes -&gt; Click New<\/strong> and then select Category as \u201cAction\u201d and Entity as \u201cNone(Global)\u201d as you can see in the below screenshot.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter  wp-image-12717\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/08\/1Execute-Global-Action-in-Dynamics-365.png\" alt=\"1Execute Global Action in Dynamics 365\" width=\"965\" height=\"723\" \/><\/p>\n<p><strong>2.<\/strong> We have selected <strong>Entity: None(Global)<\/strong> for executing the global action. So by doing this, we can reuse the same Action globally to any entity where ever needed.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter  wp-image-12718\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/08\/2Execute-Global-Action-in-Dynamics-365.png\" alt=\"Execute Global Action in Dynamics 365\" width=\"974\" height=\"379\" \/><\/p>\n<p><strong>3.<\/strong> It accepts an input and Output parameter. You can specify parameters of any of the following data types.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter  wp-image-12719\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/08\/3Execute-Global-Action-in-Dynamics-365.png\" alt=\"Execute Global Action in Dynamics 365\" width=\"973\" height=\"395\" \/><\/p>\n<p>In our case we are passing <strong>AccountId<\/strong> as an input parameter and <strong>ClonedId<\/strong> as an output parameter, so when global Action will execute it will take AccountId as an input parameter (Account record Guid as a string Parameter) and in result will return ClonedId as an output parameter(Cloned Account Guid as a string parameter).<\/p>\n<h2><strong>Execute Global Action using Xrm.Utility.invokeProcessAction:<\/strong><\/h2>\n<p><img decoding=\"async\" class=\"aligncenter  wp-image-12720\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/08\/4Execute-Global-Action-in-Dynamics-365.png\" alt=\"Execute Global Action in Dynamics 365\" width=\"968\" height=\"686\" \/><\/p>\n<p>Here as you can see in the below screenshot, in console we got Cloned Account record Id as output paramater<\/p>\n<p><img decoding=\"async\" class=\"aligncenter  wp-image-12721\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2018\/08\/5Execute-Global-Action-in-Dynamics-365.png\" alt=\"Execute Global Action in Dynamics 365\" width=\"967\" height=\"253\" \/><\/p>\n<h2><strong>Conclusion:<\/strong><\/h2>\n<p>By using the above simple steps one can use global Action on multiple entities in Dynamics 365 CRM.<\/p>\n<p>Read More about <a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customer-engagement\/developer\/clientapi\/reference\/xrm-utility\/invokeprocessaction\" target=\"_blank\" rel=\"noopener noreferrer\">invokeProcessAction (Client API reference)<\/a>.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/product\/productivity-pack\/click-2-clone-microsoft-dynamics-crm-records\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter  wp-image-10690\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2016\/01\/Copy-System-and-Custom-Entities-in-Dynamics-CRM.png\" alt=\"Copy System and Custom Entities in Dynamics CRM\" width=\"967\" height=\"242\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: In Dynamic 365 v9.0 we can use \u201cXrm.Utility.invokeProcessAction\u201d to execute Global Action. When we need to create an Action to be executed on multiple entities, we can use Global Action in Dynamics 365. Here in the below example, we are cloning Account record by executing Global Action in Dynamic 365 v9.0. Create Global Action:\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2018\/08\/execute-global-action-in-dynamics-365-v9-0-usingxrm-utility-invokeprocessaction\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":12716,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,18,19],"tags":[866,867,1855],"class_list":["post-12715","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365","category-dynamics-365-v9-2","category-dynamics-crm","tag-global-action-dynamics-365","tag-global-action-dynamics-crm","tag-xrm-dynamics-crm"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/12715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=12715"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/12715\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/12716"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=12715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=12715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=12715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}