The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to get contact details

Nagesh5
Tera Contributor

Hello Community,

 

Anyone aware how to get login contact account using glide method??

 

thanks,

Nagesh

4 REPLIES 4

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Nagesh5 ,

Can you please elaborate more?

Do you want current loggedin user information?


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

In CSM we have account and contacts and we looking for login contact account nformation how to get it.

For ex: Alex contact account is abx

 

We are looking for the way to get abx with glide user object or is there any way toget the details

 

Hi @Nagesh5 ,

Then you can use below sample code. just change the field backend name as per your table.

var gr = new GlideRecord("customer_contact");
gr.query();
while (gr.next()) {
   gs.info(gr.contact);  //Write down your field name here instead of contact
}

Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Basheer
Mega Sage

If you are using at Server level

gs.getUserId()

Below link

https://developer.servicenow.com/dev.do#!/learn/learning-plans/tokyo/new_to_servicenow/app_store_lea...

 

If you are using at client level

g_user.getUserId()

Below link

https://developer.servicenow.com/dev.do#!/learn/courses/tokyo/app_store_learnv2_scripting_tokyo_scri...

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.