How do I populate current logged in user as Assigned To?

Sid_Takali
Kilo Patron
Kilo Patron

I want to auto populate current logged in user as Assigned To and current logged in user's Primary assignment Group as Assignment Group on Case form. Now I have created Display BR and getting current userID and passing it onLoad Client Script through scratchpad variable. but it is not working in workspace.  I have made Client Script UI Type for "All".  I want know alternative ways for this use case?

11 REPLIES 11

Ankur Bawiskar
Tera Patron
Tera Patron

@Sid_Takali 

I agree with Satyaki

Can you explain your business requirement?

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

IAmAbhigyaan12
Giga Guru

Hi @Sid_Takali :

 

To auto populate 

Add in default value to that variables : javascript:gs.getUserID()//name of logged in user.

javascript:gs.getUser().getRecord().getValue('phone_number');//phone number

javascript:gs.getUser().getRecord().getValue('location');//location

If my answer solved your issue, please mark my answer as Correct & hit like Helpful

Thanks
Abi