How to assign a record to current logged in user via Flow designer?

Yesh
Tera Contributor

Hi all,

I am trying to assign the current record to the currently logged in user by using the flow designer. But it is not getting assigned.

I have returned gs.getUserID() in the script. It is not working.

Is there any other way to assign to the currently logged in user.

Thanks,

Yesh

3 REPLIES 3

Valmik Patil1
Kilo Sage

Hi Yesh,

You can achieve this by creating new action like "Get logged in user"

Please refer below screen shot

 

find_real_file.png

Please let me know if you faced any issue

Thanks,

Valmik Patil

 

Hi Valmik,

"How to create new action, Can you please help me on that.

Thank you"

 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

can you share what is configured in your flow properties?

If Run as - System -> then gs.getUserID() won't help

If Run as -> User who initiates session -> then gs.getUserID() will help

Share the screenshot

Regards
Ankur

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