Can we change the Sys_id of a record. If so, what happend if we give two records same sys_id.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2024 06:43 AM
Recently i was playing around sys_id and this questions comes in my mind when i am creating a new record from business rule that can we also set sys_id. When i go on ChatGpt it gives me a function .setUniqueValue();
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2024 07:41 AM
setUniqueValue will set the sys_id to a unique one, but is not needed when creating a record with GlideRecord and initialize() or newRecord() as this will automatically happen. You CANNOT set a sys_id to any other value when creating or updating a record as this is THE unique identifier for all records.