How to convert UI Action for use on Service Operations Workspace

Simba Naidu
Tera Contributor

Hi All,

 

I have the following UI action on the Change form to cancel the change request.

below script is used 

var changeConfirmCancelDialog;

function setChangeCancelState() {
    g_form.setValue("state", "4");
}

if (typeof window == 'undefined')
   setRedirect();

function setRedirect() {
    current.update();
    action.setRedirectURL(current);
}
 
I'm wanting to move this over to Service Operations Workspace but I am having issues. I clicked the checkbox to enable the workspace form button. Is there something that I'm missing here, do I need to put something on in the client script?
 
Thanks

 

 

1 ACCEPTED SOLUTION

It should be something like below:

Update Script and Workspace Client script part:

 

function setChangeCancelState() {
    g_form.setValue("state", "4");
	// Call the UI Action and skip the 'onclick' function
   gsftSubmit(null, g_form.getFormElement(), 'change_state'); // MUST call the 'Action name' set in this UI Action
}

 

Screenshot 2024-01-22 at 2.19.44 PM.png

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

7 REPLIES 7

Simba Naidu
Tera Contributor

Actually the UI action is visible in Service Operations Workspace but its not working as expected.

 

Sandeep Rajput
Tera Patron
Tera Patron

@Simba Naidu Could you please check if your UI Action has any conditions which is returning false.

 

Also, please check if the following checkboxes are true.

 

Screenshot 2024-01-22 at 1.46.56 PM.png

Simba Naidu
Tera Contributor

HI Sandeep Rajput

Thanks for your response. Those checkboxes are true currently.

Anil Lande
Kilo Patron

Hi @Simba Naidu 

Can you please share your UI Action configuration screen shoots?

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande