Dynamics 365 Actions

5 Comments

Actions in Dynamics 365 are a capability to create business logic that can be called in different ways such as through code or a workflow. They are not run on demand or automatically, but rather they are triggered by processes or code. If you wanted to run an action on demand you could call it from an on demand workflow. Actions take input, do something and may produce output.

Let’s go through an example of creating an action. Let’s say when a case is created where the title contains the word “bug”, we want to send an email to a developer, and assign the case record to the developer. Generally, we could write a workflow to perform these steps and run it on creation of the case. However, what if we want to not have it triggered when a case is created, but we want to run it from code as well, say from JavaScript or C#? We can bundle that functionality into an action and have it called from our front end or plugin code.

Writing the action itself is straight forward. Go to Processes:

Select new and create a new Action for our case:

The window will open:

Note the Process Arguments section. This is the input for our action. As we will be sending an email, we can have a to and from email address here. Add a ToEmail and FromEmail field. These will be EntityReference fields to the User entity:

Now we can add some steps:

Add a Check Condition for the title:

Add the Send Email step and configure the email to use the input parameters:

Then assign the case to the developer:

The action should now look like this:

Activate the action. Now, we will create a Workflow to test the action:

Enter the parameters for the action:

Activate the workflow.

Now, create a case.

After saving the case, the case is reassigned to the developer and an email is sent:

In a future post I will show how to call the action through code.

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

5 Responses to Dynamics 365 Actions

  1. Hi Carl,

    Will the input parameters be dynamic based on the parties involved or are they hard coded to Christa and Alan at all times

  2. Thanks, Carl for this blog on Actions. Sorry for being a sourpuss but can’t the above steps of the action be carried out/incorporated into a workflow itself.

Leave a Reply

Your email address will not be published. Required fields are marked *