Assign To Me UI Action

-Andrew-
Kilo Sage

Hi all,

 

I hope you're keeping positive in these hard times.

 

I'm running into a few issues with the 'Assign to me' button on our incident form. When this button is clicked, i'd like the assignment group to update along with the assigned to (of course).

 

I have this, below;

find_real_file.png

 

How do i make this so it updates the default assignee's assignment group too? I currently get this message;

 

find_real_file.png

 

Thank you all!

Andrew

10 REPLIES 10

Namrata Khabale
Giga Guru

Hey Andrew,

 

Create an UI action With Condition And Script like below image.(Change the table name and field names if required).

find_real_file.png

 

If it works for you, Mark my answer Correct and Helpful.

 

Thanks,

Namrata.

Thanks for this,

 

I have the UI action already which works fine but i'd just like the assignment group to be cleared and populated with the logged in users assignment group too. 

Kunal Varkhede
Tera Guru

Hi,

 

Use setDisplayValue() to set the value in assigned to field in UI action.

Try this,

current.assigned_to.setDisplayValue(gs.getUserName());//here i set the logged in username to assigned_to reference field
current.update();
action.setRedirectURL(current);

 

Please Mark Correct/Helpful answer if it help you in any way.

Thanks and Regards,

Kunal.

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Concerning "i'd like the assignment group to update along with the assigned to". What should happen if a user is a member of multiple assignment groups? What assignment group should than be filled?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn