The CreatorCon Call for Content is officially open! Get started here.

Assign to me button on incident sow form

Debasis Pati
Tera Guru

i want to edit and put some conditions to the assign to me button present in incident sow form view.
I could not find where this button is present.

DebasisPati_0-1760498293722.png

i tried to find this button in the declarative form actions but could not where is this present?

@Ankur Bawiskar any suggestions?

12 REPLIES 12

Ankur Bawiskar
Tera Patron
Tera Patron

@Debasis Pati 

it's normal UI action which is shown in workspace

You can update the UI action condition but remember this will impact workspace + native both

AnkurBawiskar_0-1760498841537.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Thanks for your information Ankur,
i want to show the button in 3 conditions

When Incident's State is New Or In Progress
And 'Assignment Group' is one of the groups I belong to
And I am not already 'Assigned to' the Incident
also this assign to me button also is in the list also inside the dit button i want to apply the visibility condition what i provided in both the places any idea what all things i need to follow as a best practice to achieve this?

Regards,
Debasis

@Debasis Pati 

check the condition field in both and if nothing is there then add, if something is already there then enhance your logic

something like this you can add

(current.state == 1 || current.state == 2) && gs.getUser().isMemberOf(current.assignment_group) && current.assigned_to != gs.getUserID()

AnkurBawiskar_0-1760499897621.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Hello @Ankur Bawiskar ,
I checked the out of box new global.IncidentUtils().canAssignToMe(current); already checks the 

gs.getUser().isMemberOf(current.assignment_group) && current.assigned_to != gs.getUserID()

i just wanted to add the state condition and added
(current.state == 1 || current.state == 2) && new global.IncidentUtils().canAssignToMe(current);
but no luck after that i removed everything and just tried out to show it in current.state ==1 only showing in new state still no luck>