Human Capital Management Blogs by SAP
Get insider info on SAP SuccessFactors HCM suite for core HR and payroll, time and attendance, talent management, employee experience management, and more in this SAP blog.
cancel
Showing results for 
Search instead for 
Did you mean: 
SreenathS
Advisor
Advisor
361

 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: 

  1. Prepare the workflow - Set up a workflow with necessary fields. 
  2. Create the custom action - Define an action and configure its behaviour. 
  3. Attach the custom action - Link the custom action to the parent form. 
  4. Submit the child form - Implement script logic for data transfer. 

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.  

SreenathS_0-1738946240909.png

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

SreenathS_0-1738946490844.png

Click on the "Add New" button and enter the action name, such as "Customer Details". 

SreenathS_0-1738949209426.png

Click Save and go to Form Designer and design the child form with fields for First Name, Last Name, and Customer ID.

SreenathS_1-1738946711850.png

Add a button to the form, select "Submit and Return to Root Form" and click “Save”. 

SreenathS_2-1738946775706.png

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.

SreenathS_3-1738946816327.png

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. 

SreenathS_1-1738948778207.png

The following screenshot shows the form with the attached custom action. 

SreenathS_1-1738946980573.png

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); 

 

 

SreenathS_0-1738948686571.png

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. 

SreenathS_3-1738947146428.png

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. 

SreenathS_4-1738947146429.png

SreenathS_0-1738948436560.png

 

Conclusion

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: 

Workflow Custom Actions Help 

 

 

 

 

2 Comments
raulcorrales
Product and Topic Expert
Product and Topic Expert
0 Kudos

Great blog Sreenath.

I never used this option to create custom actions but after this article I will start using it as it seems a great feature.

Thanks!! 

Sarfaraz_Shaikh
Discoverer
0 Kudos

I’m interested in SAP Advanced Workflow, but I can’t find structured learning materials beyond the SAP Help portal. The SAP Learning Hub portal doesn’t offer self-learning materials yet. Can you share any self-learning materials or let me know when they’ll be available on the SAP Learning Hub portal?