Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

SOW Workspace – Related List Declarative Action Client Script Not Executing

NeethuB
Tera Contributor

Hi Everyone,

I am trying to create a Related List Action in Service Operations Workspace (SOW) using a Declarative Action / Related List Action.

My requirement is very simple for now: I just want to create a Related List button and execute a client-side script when the button is clicked. As a first step, I am trying to display a simple alert message to confirm that the client script is being executed.

What I have done

  1. Created a Related List Action / Declarative Action.
  2. Selected the appropriate table used by the related list.
  3. Set Implemented As = Client Script.
  4. Added the action to the SOW related list.
  5. The button is successfully visible in the SOW related list.

However, when I click the button, nothing happens.

For testing, I tried a simple script such as:

function onClick() {
    alert("Hello");
}

But the alert is not displayed.

I have also tried using:

function onClick(g_form) {
    alert("Hello");
}

but I am still not getting any response when clicking the button.

My question

What is the correct way to configure a Related List Declarative Action in Service Operations Workspace (SOW) so that a Client Script executes when the related-list button is clicked?

Could someone please provide a minimal working example where clicking the Related List Action displays:

alert("Hello");

I would also like to understand:

  • Should Implemented As be set to Client Script?
  • Is there any additional configuration required for the Client Script?
  • Do I need an Action Payload Definition when using Client Script?
  • What should the correct client script function/signature be?
  • Is there any additional configuration required specifically for SOW?
  • If Client Script is not the correct approach, what is the recommended way to execute client-side logic from a Related List Action in SOW?

Once I can get a simple alert() working, my next step will be to replace it with my actual client-side logic.

Any step-by-step guidance or a minimal working configuration would be greatly appreciated.

15 REPLIES 15

Can you also share me the screenshot of the sow page and alert box

@NeethuB ,

Attached below check those

Thanks,

Dinesh

 

NeethuB_0-1787120538186.png

I tired the same the button is visible but no alert msg is showing. Also checked the console its blank.  

@NeethuB ,
Image is not clear, Can you attach the image instead of pasting that in the reply message.

script 1.png