how to create relationship between model table and company table in servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 02:21 AM
Hi,
how to create relationship between model(cmdb_hardware_product_model) table and company table.
I want to add related in model table.
Can anyone help me how can we create this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 02:30 AM
Hello!
To create a relationship between the cmdb_hardware_product_model table and the company table, add a reference field in the cmdb_hardware_product_model table that points to the company table. Configure the field as a foreign key, save the changes, and update forms or views if needed to reflect the new relationship.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 02:33 AM
What's your business case for this? Models are part of the items that can be used by a company. There is no link between them. If your hardware model is iPhone 28, you have multiple assests from that model that are assigned to a user/company. The model is not logically related to a company.
The easiest way could by to add a 'model' field on the company table so you can add the models they are using (manually or through automation), but what will this information tell you that you can't get from the asset/ci relationship to the company?
Select all CI's with model X and group by company will give you the same information.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 02:49 AM
Thanks for the reply,
I want two related list one is for company and another one is region.
I need this two in company and region as a related lists in model table.
How can I achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 04:18 AM
I already told you how to achieve it: add 'model' as list field on the company table. It just doesn't make sense. Which probably is the reason you aren't responding to my questions.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark