Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 11:18 PM
On submitting the Catalog form facing this kind of issue . And this is happening through this code.
Can I get any solution to this?
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 04:00 AM
This typically happens when you're trying to set a value that violates a unique constraint defined on one or more fields in the record.
Kindly check if there are duplicate entries in the sc_request table that have the same value for the field(s) involved in the unique constraint.
var grDuplicate = new GlideRecord('sc_request');
grDuplicate.addQuery('requested_for', current.variables.open_for); // Assuming 'requested_for' is involved in the unique constraint
grDuplicate.query();
while (grDuplicate.next())
{
gs.info('Duplicate sc_request found: ' + grDuplicate.getUniqueValue());
}