Action assignment triggering onload Client Script twice on CSM Workspace

Axel Ortiz-
Tera Expert

Hi everyone! I'm currently developing a declarative action to create a new record from a related list in the CSM workspace and then populate some fields on the form using a client script on load, however, once I click the button to create the new record the form is loading twice and triggering the client script twice as well, I checked the form in the original instance view and the client script is only triggering once there, so I assume is a workspace issue, has anyone faced something like this on the CSM workspace?

 

This is the action assignment that is being used,  the specify client action "Create new record" is the one that is OOTB from ServiceNow

AxelOrtiz_0-1697134330818.png

Workspace view of the Button

AxelOrtiz_1-1697134496544.png

 

Client script code used to test the issue(basically just to check how many times the form is being loaded)

function onLoad() {
    alert("Test client script);

}
1 REPLY 1

R_52
Tera Guru

Hey @Axel Ortiz- , have you found the way to do it ?

If so  please let me know, I am facing similar issue