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.

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
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
Tera Patron

@ha 

your requirement is not clear.

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