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

Get company name of current user in record producer

ha
Tera Expert

Hi everyone, I want to get company name of current user in record producer

This is my code: my logs is undefined

Screenshot_30.png

3 REPLIES 3

Murthy Ch
Giga Sage

Hi @ha 

table724 variable is referring to which table?

 

Thanks,
Murthy

Saurav11
Kilo Patron

Hello,

 

What is table724?

 

Also please try the below for company:-

var companyname;
var gr=new GlideRecord('sys_user');
gr.addQuery('sys_id',gs.getUserID());
gr.query();
if(gr.next())
{
companyname=gr.company.getDisplayValue();
}

 

Please mark my answer as correct based on Impact.

 

Ankur Bawiskar
Tera Patron

@ha 

your requirement is not clear.

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