Support Portal ContactGet in touch

Actions in Dynamics

   Words by Paul McQuillan

   on 24/12/2018 08:00:00

imageOne area that can be confusing when looking at Dynamics Workflow is how Actions fit into the Synchronous/Asynchronous Workflow Model – as at first glance, they appear similar to Workflows and Dialogs.

This article is aimed at discussing why Actions exist and what they can be used for, with links to real-world examples and how to put these uses in action.

Dynamics 365 has always given us the option of creating Workflows that would run a sequential block of logic – and these would typically be triggered from an automated action in CRM (say updating an Opportunity) to then run a set of steps.

Workflows would then help build line of business logic into your Sales or Project Management Process, allowing automatic Tasks or Emails to be created as crucial steps in the Business Process, or reminders or calls to actions for the Users involved in the Process.

Therefore within each Workflow we would have a set of Steps to action certain things in CRM, typically Update a Record or Create a New Record.

So if we take a look at a typical Workflow then this would appear something similar to the following:

Top-Workflow

The Workflow having a defined Trigger to Start the logic, and then a series of Steps and Conditions that would form the output of the Workflow within CRM.

Each of these Steps is effectively an ‘Action’ within that Workflow – and previously this list of Actions was limited to:

  • System Actions provided by Dynamics 365 – Create, Update, Delete, Send Email, Change Status and a few more.
  • Custom Actions built by developers adding code-based logic to Dynamics

Actions in Dynamics 365 changes this to allow a Customizer to build their own Custom Actions without resorting to Code – and so build new Micro Actions that can be incorporated into Workflows and other Processes.

Each Action then differs from a Workflow in the following ways:

  • Invoked rather than Triggered – and so always called from another source rather than event in CRM, allowing the Action to be invoked from a variety of sources
  • Supplied with Input Parameters that can then play into the logic of the Process
  • Resulting with an Output that can be used by the Process or Logic that has invoked the Action.

This makes the flow of our Action look similar to:

Top-Workflow (1)

Similar to the Workflow, but with the changing Invocation and Parameters giving a different dimension to the type of logic we would build into the Action.

This works as a more traditional Function in the base of logic that makes up your CRM:

Top-Workflow (2)

This Action as a Function can then be invoked from our original Workflow as one of the Steps – and so changing the nature of our Workflow in calling a Custom Action instead of the default Steps provided by CRM:

Top-Workflow (3)

This Action in the middle of our Workflow effectively becoming a re-usable Custom Action but without requiring any Code – a kind of Workflow within a Workflow, but much more controllable through the use of Parameters.

(this is where Actions can often be confused with Child Workflows, as some of the elements are similar, but Actions are much more effectively designed to be embedded in a way that Child Workflows are not – the reference links below are very good at expanding on this distinction of Actions vs Child Workflows)

Why is this useful?  Well, once we have built our Action, we can invoke or call this from a variety of places within Dynamics 365:

  1. Most obviously, from a Workflow or other Process in Dynamics
  2. From a Button embedded in a Business Process Flow  - so the action forms part of the process.
  3. From Javascript within the Form – allowing the Action to be triggered from an immediate client-side action.
  4. Externally as a Call from a 3rd Party Application or Integration
  5. By a Plugin or other Custom Code Module calling the Dynamics Webservice to run your Action.

These different ways of calling an Action then allow the Action to be a Function within your build of Dynamics 365 – a re-usable method that can be invoked within and without Dynamics.

The Developers out there will appreciate just how useful this is, as it promotes the concept of code re-use, or in this case process re-use – this helps avoid duplicating logic within the way you use Dynamics, and avoids the dreaded copy’n’paste coding.

This format of creating small declarative functions in your business logic is similar to other concepts popular in the Cloud for Flow and Azure Web Functions – helping to build a technology infrastructure that is small, self-containerd, instant and crucially able to be consumed from any device or source; essentially one of the evolutions of the Cloud model.

Links in this Site

Calling a Dynamics 365 Action using the Organisation Webservice

https://www.crmcs.co.uk/content/calling-a-dynamics-365-action-using-the-organisation-webservice.aspx

Further Reading on Actions

Getting started with Actions in Dynamics 365 & Smart Buttons in Ribbon Workbench 2016

Great article on how Actions differ from Workflows, and good diagrams to backup the point.

https://community.dynamics.com/crm/b/crmcat/archive/2017/03/20/getting-started-with-actions-in-dynamics-365-amp-smart-buttons-in-ribbon-workbench-2016 

Useful Thread on Actions vs Workflows

https://community.dynamics.com/crm/f/117/t/195836 

Podcast: Actions vs Child Workflows in Dynamics 365

https://crm.audio/implement-this-27-actions-vs-child-workflows-in-dynamics-365/

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

CRMCS Quick Start Guide: How To Produce a Microsoft Teams Live Event Dynamics 365 Marketing: Lead Scoring and Sales Acceptance Designing and Developing Microsoft Power Apps Portals Thank You for Attending CRMCS’ Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Thank You for Attending Our Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Webinar: Discover How CRMCS Have United Dynamics 365, SharePoint and Microsoft Teams To Create Sales Excellence Ignite your workflow by adding DocDrive365 to Office 365 The CRMCS guide to everything you need to know about integrating Teams with Dynamics 365 Saving Time By Keeping Documents In One Place TDE Database Encryption with On Premise Dynamics The Key to Successful Compliance in 2020 Part 2: Let’s get GDPR Compliant with Microsoft Power Automate Top 3 Essential Tips for Remote Working Dynamics 365 Marketing: Top 5 Best Features Dynamics Day in the Life - Puma Investments Can you use Teams to amplify collaboration in Dynamics? Part 1: Using a Scheduled Power Automate to Trigger Expiry Date Reminders The secrets of successful document collaboration in Dynamics CRMCS launches new AppSource approved DocDrive365 Dynamics Day in the Life - Moneypenny Release Management Add the App to Dynamics DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Building a New Scheduled Process using Flow
  • "Paul has made a real difference to how my team of 24 people record and store valuable customer data and sales opportunities. Highly recommended."

    James, Operations Director

  • "Understanding your business allows us to advise when to implement aspects of CRM and, likewise, when not to."

    Paul McQuillan, Managing Director

  • "Dynamics 365 and CRMCS have made a real lasting difference to our business, allowing us to replace older systems that were holding back our performance."

    Grahame, Chief Operating Officer

  • "James worked well with us to help connect CRM with Outlook and relate how this might benefit our team using CRM for Property Care."

    Natalie, Property Care Supervisor

  • "Matt was really good with helping us run User Testing on the new Compliance Module of our CRM System."

    Tom, Compliance Administrator

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
Manchester
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue
London

Content © CRM Consultancy.