How to avoid creation of duplicate comments?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 02:26 AM
Hi All,
I am facing Duplicate issues in Additional Comments field.
When i update a comment from Incident to Case, it displays 2 comments in Incident form and displays 1 comment in Case form.
Also, when i update a comment from Case to Incident, it displays 2 comments in Case form and displays 1 comment in Incident form.
Mapping Additional Comments from Incident to Case.
Table: Incident
When to run: after update
Filter Condition: Additional Comments Changes
var latest = current.comments.getJournalEntry(1);
var notes = latest.substring(latest.indexOf(")")+1).split("/n/n");
var gr = new GlideRecord('sn_customerservice_case');
gr.addQuery('sys_id',current.u_case);
gr.query();
if(gr.next())
{
gr.comments = "Comments updated from "+current.number+"\n"+notes;
gr.update();
}
Mapping Additional Comments from Case to Incident
Table: Case
When to run: after update
Filter condition: Additional Comments changes
var latest = current.comments.getJournalEntry(1);
var notes = latest.substring(latest.indexOf(")")+1).split("/n/n");
var gr = new GlideRecord('incident');
gr.addQuery('sys_id',current.parent);
gr.query();
if(gr.next())
{
gr.comments = "Comments updated from "+current.number+"\n"+notes;
gr.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2020 06:02 AM
Hi Pavel,
Thanks for your reply. The solution you mention above works well for the widget where you have the list of approvals. I was having that issue now when I was trying to add the rejection comments to this page. But the solution I proposed works when you are approving or rejecting on one specific approval.
Kind regards,
Phonsie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2021 07:12 AM
Hello Pavel87,
Is their any update on this issue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2019 01:26 AM
Use gr.setWorkflow(false) in your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2021 12:46 AM
try to use below condition in both the BRs
session.isIntractive()
