How to populate Company for imported user?

Rairai31
Giga Guru

How do I populate the Company field for imported users? Thank you.

10 REPLIES 10

gajananvwit
Tera Contributor

Hi,

add field script to company field and return company sys_id - from core_company table

Hi @gajananvwit, I already created this but still not populating.  Can you share some scripts? Thank you. 

Rairai31_0-1704957310880.png

 

Hi,

if you are adding company from excel sheet then you have to use 

source.company name = use company name from your source table field

var cmpany = source.company_name;

var gr = new GlideRecord('core_company');

gr.get('name',cmpany);

return gr.getUniqueValue();

 

Hi @gajananvwit, we do not use spreadsheet or data sources. This happens at login where users are autoprovisioned. Thank you.

Hi @Rairai31 ,

 

Can you provide more information how user is doing autoprovision. 

 

 

Regards,

Swamy