Need help on "Assign Survey" Declrative Action (List Action) creation

Bird1
Mega Sage

Hello,

 

We have Custom App Workspace and would like to copy the "Assign Survey" OOB UI Action to the Workspace. Our goal is we don't need user to go to "Survey Definition" and use the "Assign Survey" OOB UI Action but instead, we have a custom table to track the on-time survey response, so we would like to create the button in the list view of Workspace on that table and let user manually assign the survey by this button.

 

I do research, we need to create Declarative Action (List Action) for this, but no idea how to achieve on to copy the "Assign Survey" OOB UI Action to the new Declarative Action. The GlideDialogWindow doesn't work in Workspace.

 

What type of "Implemented as" should I use? Can anyone give me suggestion?

1 REPLY 1

PratikshaKate
Tera Contributor

Hi @Bird1 Considering that you want to create a declarative action and you want it to work just like the OOB UI Action present in system.

 

I found the below steps when I searched as we can't actually link the UI action to the declarative action.

 

create a Declarative Action and configure it to execute the same logic as the UI action, either through a client script, server script, or a UXF client action. This allows you to leverage existing UI action logic within the declarative action framework, avoiding customization of UI Builder pages and enhancing the upgrade experience. 

 

Example: Converting a UI Action to a Declarative Action:
Let's say you have a UI action on the Incident table that sets the state to "Canceled" and adds work notes. 

Identify the UI Action: Find the UI action (e.g., "Cancel Incident") and its script logic. 

Create a DA: Create a new declarative action with the type "List" (if it's a list action) or "Form" (if it's a form action). 

Configure the DA:
Action Type: Select "Server Script" (since the UI action has server-side logic). 

Script: Copy the UI action's server-side script into the DA's script field. 

Action Assignment: Create an assignment record to make the DA available on the Incident list or form. 

 


Mark my answer helpful if it helped you 🙂