Flow designer to update assigned_to using gs.getUserID()

Sam Motley
Giga Guru

Hi All, 

 

Hope today finds you well 🙂 

 

Hopefully a simple one but strangley cannot find anything about it outside of this thread but doesn't help me as i cannot use an action script...https://www.servicenow.com/community/it-service-management-forum/flow-designer-set-logged-in-user-in...

 

I'm trying to set the assigned_to field to the user who runs my flow, i have the flow to run as the person who initiates it, but the field does not populate. The idea is the first advisor to respond to an email and update the ticket gets that ticket assigned to them...Any ideas? 

Thanks all, 

 

Screenshots below: 

SamMotley_1-1665479848353.png

 

SamMotley_0-1665479817641.png

SamMotley_2-1665479891819.png

 

 

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi 

in the inline script of your update action just write

return gs.getUserID();

Maik

View solution in original post

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

Hi 

in the inline script of your update action just write

return gs.getUserID();

Maik

Thanks @Maik Skoddow that works glad it was simple in the end 

Glad to help.

Muhammad Khan
Mega Sage
Mega Sage

Try replacing

var assignedto  = fd_data.trigger.current.gs.getUserID();

with

var assignedto  = gs.getUserID();