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.

Add users to multiple companies.

fibssy
Tera Guru

Hi community. We just went live with servicenow in our company and there is a need to add a user to multiple companies. and select the correct company on he incident/change form How can I achieve this? Thank you in advance.

 

 

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

The company field on the sys_user record is a reference field. That means you can only point to one at a time. If you want to have multiple users in multiple companies, I recommend creating a many-to-many table and it will show up as a related list on the form (after you configure related lists of course.)

Docs: Create a many-to-many relationship

View solution in original post

5 REPLIES 5

Chuck Tomasi
Tera Patron

It sounds like you are using domain separation. Can you confirm?

Hi Chuck, 

No, we are a B2B service provider and imported all users and companies in our instance within the global application.

Hello Chuck, thank you for this response.

What if we are using a domain separation ? how would we provide a user access to multiple but limited companies in that case ?

The goal here is the agent when logs in to the Service Portal, can raise an INC or a Request only for the companies he has access to.

Chuck Tomasi
Tera Patron

The company field on the sys_user record is a reference field. That means you can only point to one at a time. If you want to have multiple users in multiple companies, I recommend creating a many-to-many table and it will show up as a related list on the form (after you configure related lists of course.)

Docs: Create a many-to-many relationship