Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to get login user email id into SCTASK description

poco
Tera Contributor

i need to update login user email id  in task description by using catalog task activity in workflow 

i tried this   task.description = Login using the users email address + current.varibles.Email(); 

but i can't get it please suggest possible ways 

Thank you

2 REPLIES 2

abirakundu23
Giga Sage

Hi @poco ,
Please try in this way.

var email = gs.getUser().getEmail();

gs.log("Email of logged in user:" +email);

task.description = email;

Please follow link to get more details.
User Object Cheat Sheet – ServiceNow Guru

Please mark helpful & accept answer if its worthy for you.

abirakundu23
Giga Sage

Hi @poco ,

is it working for you? 
If it's solved your purpose, please mark helpful & accept answer.