Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

get current user company in service catalog

Abhinab Achary1
Tera Guru

Hi All,

I have a service catalog. now in a reference field pointing to core_company table. I want to populate current user's company   name ...

I need a suggestion on this

Regards

Abhinab

1 ACCEPTED SOLUTION

Swapnil Bhakar1
Mega Guru

Hi Abhinab,



Put this "javascript:gs.getUser().getCompanyID()" in the default value of your field where you want to populate current users company name.



Hope it will help you.



Regards,


Swapnil



PS: Hit like, Helpful or Correct depending on the impact of the response


View solution in original post

5 REPLIES 5

Hi, this didn't work on my case.

I have tried below on the field of variable field on the service catalog.

Could you kindly tell me how it worked?

 

1.Type Specifications

Reference:core_company

 

2.Default value

Neither of the codes worked.

javascript:gs.getUser().getCompanyID();

javascript:var com = gs.getUser().getCompanyID(); if (com) com;