- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 11:39 AM
Hi,
I am getting this error when I click on "Accept" button on Idea form.
How to fix this?
Thanks,
Vaishnavi
Solved! Go to Solution.
- 1,022 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2024 11:06 AM
Hi @Vaishnavi35 ,
Based on shared log details, there is insert query running over task table which is adding program record, and the sys_id showing in the unique key voilation belongs to one of PGM record.
Please check the code without this PGM record code, comment that part and test it again. It should work.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 01:51 PM
Thanks @Vaishnavi35,
Nothing looks out of the ordinary, for the first BR (the one that creates demand), does it run on before or after?
Also, in the error message, I can see a sys_id.
Which table can you find a record with that sys_id? I am assuming it could be the [idea], [dmn_demand], or [sc_req_item] table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 05:25 AM - edited 06-14-2024 05:34 AM
Hi James,
Both BR's run on before.
be74fb5d87b64a10ed64da473cbb356a - Idea sysid
e645ea7847773510b77ff8f5536d43fe - sysid in the error
c4d47f5d87b64a10ed64da473cbb35a9 - sysid of the demand
230fab5587b64a10ed64da473cbb35a2 - sysid of RITM
sysid of the error always remains same for few records and then changes. Whenever I accept the idea I meant.
Thanks,
Vaishnavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2024 01:00 AM
So which table does the sys_id in the error message belong to?
That would give us where the duplicate is being created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 03:31 AM - edited 06-19-2024 03:47 AM
How do I check which table it belongs to?
I tried a background script, it says table is "null"
function findTableBySysId(sysId) {
var tables = GlideDBObjectManager.get().getAllTables(); // Get all table names
var tableName = null;
// Iterate through all tables
for (var i = 0; i < tables.length; i++) {
var table = tables[i];
var gr = new GlideRecord(table);
// Check if the record with the given sys_id exists in the current table
if (gr.isValid() && gr.get(sysId)) {
tableName = table;
break;
}
}
return tableName;
}
// Example usage
var sysId = '0ccea27d87a20a909e70c91acebb357c'; // Replace with your actual sys_id
var tableName = findTableBySysId(sysId);
gs.info('Table Name: ' + tableName);
Thanks,
Vaishnavi
Thanks,
Vaishnavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 12:31 PM
@Vaishnavi35, there is a Chrome plugin (maybe on other browsers too) called SN Utils.
You can use it to find where the record resides.
If you can't install the plugin for whatever reason, try to search by the sys_id in the the following tables:
- Demand
- Request & Requested item
- Attachment
- Idea
Cheers