How can I change primary key? (sys_id -> another column that I make)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2022 11:54 PM
I need to map reference from a table.
For exmaple, I make a 'common code ' table that has code ( I want to set this column to PK)
I know sys_id is primary key basically in ServiceNow system, and If I refer to another table, I save sys_id of the table in reference field of table.
However, I want to push the 'code' column instead of 'sys_id' colomn because I have to push datas from the outside.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 02:03 AM
Hi Jimin,
How are you pushing data from outside servicenow, using API or using import sets?
If its import set then you can mark the 'coalesce' to true for your 'Code' field.
Now in order to make it Unique may be you can set the Unique checkbox to true in the dictionary of your custom field.
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 08:29 PM