Softstuff Consulting
My occasional musings of a technical nature
  • Send us a message
  • About Softstuff Consulting
  • Privacy Policy
  • Main Website
Dynamics365

Creating an action to call from JavaScript in a HTML form

by Ian Blair June 2, 2019 No Comments

Following on from my previous Dynamics 365 post about getting optionset data from CRM to use in drop down lists in HTML forms we can use the previous piece of code that created a small workflow plugin. To do this you will need to create an Action in CRM. An action is really just a type of workflow except it makes it really simple to call it from external code. It can do everything a workflow can do except we control when its triggered, but it can include input variables and output variables.

First create a new action in Dynamics 365. This is done under the settings menu in the Process list.

A create action screen from Dynamics 365

Give the action a descriptive name as this will used to call it from JavaScript in later steps.

A custom step in a Dynamics 365 workflow that assigns the input values to a custom workflow step.

In this example we are reading all the optionset values for the IndustryCode field in the Account entity, but any entity/field combination can be substituted.

A custom Dynamics 365 workflow step to assign the result of a workflow step to a variable.

Next create another step that will assign the output from the previous step to a variable called Values.  This is created in the process arguments step of the action.

The screen showing the action details for a Dynamics 365 action.

The action needs to be activated and this step is done.

In the next article I will show how easy it is to display these values in a HTML form embedded in a CRM form.

  • Previous Getting optionset lists to use in a webresource HTML form4 years ago
  • Next Calling an action from Javascript in a Web Resource4 years ago

Leave a Reply Cancel reply

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

Recent Posts

  • How to make your Powershell scripts more annoying
  • What motherboard is in my PC
  • A Dynamics365 plugin thought experiment
  • Registering a Dynamics365 plugin and I get an error
  • Going back in time with Dynamics365

Categories

  • Bootstrap
  • C#
  • CSS
  • Dot Net Core
  • Dynamics365
  • JavaScript
  • Powershell
  • T-SQL
  • Thoughts
  • VBScript
  • Visual Studio
  • Windows
  • Xamarin

Recent Comments

  • S0ftStuffB055 on Call a Dynamics365 workflow from JavaScript
  • Siva on Call a Dynamics365 workflow from JavaScript
  • TC Sharpe on Throw exceptions in Dynamics365 workflow plugins, or don’t
  • BigOwl on Throw exceptions in Dynamics365 workflow plugins, or don’t
  • CRMGod on Access a Dynamics365 embedded webresource

Archives

  • January 2021
  • May 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • October 2019
  • June 2019
  • May 2019
  • February 2019
2023 Softstuff Consulting. Donna Theme powered by WordPress
  • Twitter