Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Catalog client scripts to populate logged in user

meghana23
Kilo Contributor

Requirement is to populate logged in user name.

Wrote client script of onload function just to populate logged in user

alert('welcome');
var us = g_user.userID;
g_form.setValue('caller_id',us);

even alert is not getting populated

Any suggestions

 

6 REPLIES 6

Hi Meghana

If my response is helpful please mark it as correct also

 

Regards,

Rakesh

Hi,

For your script to work please ensure the UI Type - ALL

It will work

regards
Ankur

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