Gatting record not found error after in record producer, after updating record by record producer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2024 08:13 PM
Hi Every one,
I am facing an record not found error(in record producer itself not in the targeted record )while submitting a record producer for updating an incident record, please help in this.
the record producer script and screen short as below.
var usrGR = new GlideRecord('incident');
usrGR.addQuery('sys_id', producer.incident);
usrGR.query();
if (usrGR.next()) {
usrGR.short_description = producer.comment;
usrGR.update();
}
gs.info(producer.comment);
current.setAbortAction(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2024 08:20 PM
I think the behavior is correct.
Your record producer is trying to redirect to the newly created record, but since you are using the current.setAbortAction(true) call, the new record never gets entered/inserted into the Database.
Therefore, the record not found message.
Please mark helpful if this helped or accept the solution if it solved your query.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2024 08:25 PM
what need to do to remove it, my client do not need the record not found error, please suggest. if any alternate solution is welcome
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2024 08:27 PM
how do remove the not found error, any suggestions, my client does not want the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2024 06:37 AM
I have tried to replicate your issue, but the only thing that is working is the redirect to setting on the record producer page.
See below screenshot:
Note: this will also apply to all new records you create using the record producer.
Please accept the solution if it helped.
Thanks,