The Zurich release has arrived! Interested in new features and functionalities? Click here for more

"Assign to me" button on HR Case - agent workspace

miro2
Mega Sage

Hi

I would like to confirm that the "Assign to me" button in the HR Agent Workspace is not added by default by ServiceNow?
Or is it up to the companies and they can add it if they want. I am not sure why the button is not visible in the HR Case workspace view and the agent has to manually assign themselves, whereas it is available in the native UI.

In UX Form Actions (sys_ux_form_action) I don't see 'Assign to me' button for any HR Case table.


I know how to enable it in the UI Action (for HR Case, 'Workspace Form Button' is unchecked). What is the process behind this? Was it configured that way by design?

miro2_0-1705072253967.png

 


If anyone can shed some light on this, I would be grateful.
Thank you

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@miro2 You assumption is correct the "Assign to me" button is not added by default in HR Agent workspace. You need to follow the following steps to make this button visible and function in HR Agent workspace.

 

1. Navigate to UI Actions in the backend. Filter Assign to me button for sn_hr_core_case table.

Screenshot 2024-01-12 at 9.02.11 PM.png

2.Scroll to the bottom and check the workspace related checkboxes, and add the script in the script field.

Screenshot 2024-01-12 at 9.06.08 PM.png

Here is the script for your reference.

function onClick(g_form) {
    assignToMe();

    function assignToMe() {
        g_form.setValue("assigned_to", g_user.userID);
		g_form.submit(g_form.getActionName());
    }
}

 

Here is how the button looks on the workspace.

Screenshot 2024-01-12 at 9.08.21 PM.png

Hope this helps.

View solution in original post

13 REPLIES 13

Sandeep Rajput
Tera Patron
Tera Patron

@miro2 You assumption is correct the "Assign to me" button is not added by default in HR Agent workspace. You need to follow the following steps to make this button visible and function in HR Agent workspace.

 

1. Navigate to UI Actions in the backend. Filter Assign to me button for sn_hr_core_case table.

Screenshot 2024-01-12 at 9.02.11 PM.png

2.Scroll to the bottom and check the workspace related checkboxes, and add the script in the script field.

Screenshot 2024-01-12 at 9.06.08 PM.png

Here is the script for your reference.

function onClick(g_form) {
    assignToMe();

    function assignToMe() {
        g_form.setValue("assigned_to", g_user.userID);
		g_form.submit(g_form.getActionName());
    }
}

 

Here is how the button looks on the workspace.

Screenshot 2024-01-12 at 9.08.21 PM.png

Hope this helps.

Hi @Sandeep Rajput 

thank you for quick reply

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @miro2 

 

One more thing. Assign to me not working as expected at Service Operation workspace. Look like it is a bug.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Zach3
Tera Guru

Anyone get "Assign to Me" to work in Agent Workspace for HR Case Management? Clicking the UI action sets the "Assign to" properly to current logged-in user, but none of the usual methods are working to save/update the record: g_form.save(); gsftSubmit(null, g_form.getFormElement(), 'sysverb_update_and_stay'); or current.update().