Friday, December 18, 2015

Invoke custom actions from a workflow or dialog

Create a custom action

  1. Go to Settings > Processes(How do I get there?)
  2. On the Nav bar, choose New. Give the process a name and choose the Action category.
To request an approval for the discount, we’re using a custom action called Approval Process. We added an input parameter, SpecialNotes, and a Send email step to create a new message and send a request for the manager’s approval, as shown here.
Add a step - send email
To configure the email message, choose Set Properties. When the form opens, use the Form Assistant to add special notes and other information to the email, as highlighted on the screenshot. To add the special notes, place the cursor where you want them to appear in the message, and then, in the Form Assistant, under Look for, chooseArguments in the first drop-down list and choose SpecialNotes in the second drop-down list, and then choose OK.
Set up email
Before you can invoke the action from a workflow or dialog, you have to activate it. After you have activated the action, you can view its properties by choosing View properties.
Activate custom action - approval process

Invoke a custom action from a workflow

  1. Go to Settings > Processes(How do I get there?)
  2. On the Nav bar, choose New. Give the process a name and choose the Workflow category.
We created a workflow that invokes the Approval Process custom action whenever the manager’s approval for a discount over 20% for an opportunity is required.
Set action properties from workflow
You can set the action’s input properties by choosing Set Properties. We added a name of the account related to the opportunity in the special notes. In the Form Assistant, under Look for, choose Account in the first drop-down list, choose Account Name in the second drop-down list, and then choose OK. The Target property is required and it is populated by the system. The {Opportunity(Opportunity)} in the Target property is the same opportunity that the calling workflow is running on. Alternatively, you can choose a specific opportunity for the target property by using lookup.
Set input parameters for ApprovalProcess action

Invoke a custom action from a dialog

  1. Go to Settings > Processes(How do I get there?)
  2. On the Nav bar, choose New. Give the process a name and choose the Dialog category.
You can implement a scenario that’s similar to calling the Approval Process from a dialog as shown in the following illustration.
Enable custom action from dialog
Set up input parameters, as shown here.
Set properties for ApprovalProcess action

No comments:

Post a Comment

How to Deploy your API as a web app or API app

  Before you can call your custom API from a logic app workflow, deploy your API as a web app or API app to Azure App Service. To make your ...