
Introduction
This document provides guidance on creating and executing Advanced Workflow Custom Actions on the new GCP platform
This document assumes that you have prior knowledge and experience with Advanced Workflow application. You will also need Administration permissions in Advanced Workflow application on your GCP Tenant.
Custom actions help users move from a parent form to a child form to find specific information, such as a customer id, using details like the customer’s first name, last name, or email ID. This keeps the parent form simple and organized. For example, users can click a button on the parent form to navigate to a child form, enter details, search for the customer ID, and bring the information back to the parent form.
Steps to Implement:
Step 1: Prepare the workflow
Log in to the workflow system and create a sample workflow named Custom Action. In the Case Create action, add custom fields like Customer ID to the form. The final form is displayed in the screenshot below.
Note: This document does not cover the steps for creating a workflow or custom fields.
Step 2: Create the Custom Action
In this step, we will create a custom action. Navigate to Form Designer, add fields like First Name, Last Name, and Customer ID, then add a button, set its behavior, and save the form
From Workflow, go to Setup > FIELDS & FORM > Custom Actions
Click on the "Add New" button and enter the action name, such as "Customer Details".
Click “Save and go to Form Designer” and design the child form with fields for First Name, Last Name, and Customer ID.
Add a button to the form, select "Submit and Return to Root Form" and click “Save”.
The following button behaviors are used exclusively with custom actions:
Submit Form: Saves data and returns user to the previous form. The previous form relates to the action from which the custom action was called.
Submit and Back to Root Form: Saves data and returns the user to the first action from which initial custom action was called.
Submit all Forms: Submit all data that user enters and completes the execution of the root action. The root action is the one from which the custom action was called.
We have successfully created the custom action and will now attach it to the parent form.
Step 3: Attach the Custom Action
In this step, we will navigate to the custom action workflow to attach the custom action to the button.
Go to Workflow > Form Designer, add a button, select the button behavior as Execute Custom Action, and attach the custom action created in the previous steps.
The following screenshot shows the form with the attached custom action.
Step 4: Submit the Child Form
In this step, we will create a script and add it to the custom action's On Submit event. The script will take the Customer ID from the child form and update it in the parent form. For testing, we will enter a value in the child form, and after submission, the Customer ID will be set in the parent form.
From Workflow, go to Setup > DEVELOPMENT > Scripts and create a new script of Form Event Type with name “ca - get customer id” (with system Id = ca_get_customer_id)
Next, copy and paste the following code to your script:
def cid = form.getValue('ca_child_customer_id');
parentForm.setValue('ca_customer_id',cid);
Add the script to the custom action's On Submit event.
From Workflow, go to Setup > FIELDS & FORMS > Custom Actions, click Edit Button, attach the script to the submit event and then click the Update button.
Go to the custom action workflow and click the Customer Details button. This will navigate to another form. Enter the Customer ID and click the Submit button. Upon submission, the form will return to the parent form, and the Customer ID from the child form will be displayed in the parent form.
Custom actions enhance workflow flexibility by allowing seamless navigation between parent and child forms. By implementing custom actions, users can efficiently retrieve and update specific information, such as Customer ID, while keeping the parent form clean and organized. This structured approach improves usability, streamlines data entry, and enhances the overall user experience.
References:
Advanced Workflow Custom Actions online documentation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 |