FlowDesigner javascript:gs.getUserID() in condition not working

triciav
Kilo Sage

I am trying to add a condition if the assigned_to of an incident changes and it is NOT the currently logged in user send a slack message

If it is assigned to the current logged in user don't send.

This is my Flow and it is not working, it sends a slack message every time.

Does flow designer not use the javascript:gs.getUserID()

find_real_file.png

6 REPLIES 6

amaradiswamy
Kilo Sage

Hi,

gs.getUserID() returns sys_id of the logged in user record.

so, change your condition like below

Trigger-->Incident Record--> Assigned to --is not- javascript:gs.getUserID()

Thanks amaradiswamy,

 

Assigned to is a reference field so it does notlet me add the javascript:gs.getUserID()

 

So I changed it to look at the sysID and its working

find_real_file.png

Yes, for reference fields when we type the javascript:gs.getuserID()  then system will show in red color but when we save it, it should accept this.

 

It's good that you find a way to dot walk to the sys_id field and get it worked. Good job.

Actually in Flow Designer it clears the field and does not show it in red.

Hence dot to the sys ID worked 🙂

Thank you