Invalid update. Record has been deleted or you no longer have access to read
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 01:59 AM - edited 09-12-2024 02:01 AM
Hi,
I am getting this error 'Invalid update. Record has been deleted or you no longer have access to read', when I am trying to update an incident which is already closed. If I update once, it's working fine. If I update multiple times, I get this error. Kindly help.
This is what I have done to produce this error.
Step 1: Went to System Definition - > Incident table - > Add a new Field 'Something Severity'. Add the choices required
Step 2: Created a Client Script to show the message for each option.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
g_form.clearValue(newValue);
if(newValue == '1'){
g_form.showFieldMsg('u__severity', 'Catastrophic impact to critical operations', 'info');
}
if(newValue == '2'){
g_form.showFieldMsg('u__severity', 'Degradation of multiple critical operations', 'info');
}
if(newValue == '3'){
g_form.showFieldMsg('u__severity', 'Customer facing operations impacted', 'info');
}
if(newValue == '4'){
g_form.showFieldMsg('u__severity', 'Single area or function impact', 'info');
}
if(newValue == '5'){
g_form.showFieldMsg('u__severity', 'Limited operations interruptions', 'info');
}
}
The incident record ONCE CLOSED should be able to be editable by Admins, and Incident and Problem Management group. So, I have created an ACL.
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 02:06 AM - edited 09-12-2024 02:07 AM
Hi @Community Alums,
Try using the Group name instead of Group sys id.
Example:
var currentUser = gs.getUser();
gs.info(currentUser.isMemberOf('Capacity Mgmt'));
Refer this docs (last part) for more info: https://docs.servicenow.com/bundle/xanadu-api-reference/page/app-store/dev_portal/API_reference/GlideUser_global/concept/GUserAPI.html
If you found my response helpful, please mark it as Solution and Helpful.
Thanks and Regards,
Ehab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 05:15 AM - edited 09-12-2024 08:48 AM
please modify client script --> clearValue we don't need in your case mostly
WRITE ACL:
if (current.state == 'Closed')
{
if (gs.getUser().isMemberOf('groupname'))
{
return true;
}
return false;
}
return true;
Make sure no other BRs shouldn't run on update on incident..please debug this one
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 02:13 AM
That didn't work. I still have the same issue. I can see the error.
Regards
Suman P.