How to avoid "Accept Assignment"?

Sirko
Tera Expert

Hi,

 

I'm creating a new case and assign it to an Agent using

var newCase = new GlideRecord('sn_customerservice_case');
newCase.initialize();
newCase.assigned_to = gs.getUserID(); 
newCase.insert()

but the Agent must click "Accept Assignment".

How can I avoid that?
The Case should directly be assigned to the agent.

Best Regards
Sirko Fresia

1 ACCEPTED SOLUTION

Sirko
Tera Expert

Ok, I found the solution:
The state must be set to "open", then the assignment is accepted.

 

var newCase = new GlideRecord('sn_customerservice_case');
newCase.initialize();
newCase.assigned_to = gs.getUserID(); 
newCase.state = 10;
newCase.insert();

 Regards
Sirko

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Sirko 

HR case can be submitted by end users? So ideally not a good practice to use gs.getUserID()

Is that "Accept Assignment" a OOB button?

I couldn't see that on HR case table

AnkurBawiskar_0-1742484262670.png

 

If it's custom UI action then since you are directly assigning deactivate that button

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

it is not about HR cases.
The agents use cases to communicate with customers.
The agent can click on button "Create Emergency Case" (in Agent Workspace) and the case should then be assigned to the agent without clicking "Accept Assignment".

Regards
Sirko

@Sirko 

if you don't want them to click "Accept Assignment" then why not disable that UI action?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi,

disabling the button will not let the agents accept the assignment, which is pre-requisite to show other buttons in the action bar for communicating with the customer, e.g. "Request Info" or "Propose Solution"

Regards
Sirko