- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2020 11:35 AM
Hi All,
how can we copy worknotes from Interaction to Incident on agent workspace?
I tried editing with below UI Action yet no luck, can someone help me with this.
if(current.update()){
var inc = new GlideRecord("incident");
inc.initialize();
inc.caller_id = current.opened_for;
inc.short_description = current.short_description;
var worknotes = inc.work_notes.getJournalEntry(1);
//inc.work_notes = current.work_notes;
worknotes = current.work_notes;
action.openGlideRecord(inc);
}
Thank you.
Regards,
Meenal
Solved! Go to Solution.
- Labels:
-
Agent Workspace
- 5,880 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2021 06:23 AM
Hello,
For those who wants the solution :
- Create a business rules on the table "interaction_related_record", before insert with order of 400 and copy this code :
(First part has been taken from another OOB business rules, it's because BR run twice on insert ....)
var existingRelationship = new GlideRecord("interaction_related_record");
existingRelationship.addQuery("interaction", current.interaction);
existingRelationship.addQuery("document_id", current.document_id);
existingRelationship.setLimit(1);
existingRelationship.query();
if (existingRelationship.next()) {
current.setAbortAction(true);
}else{
var grTask = new GlideRecord(current.document_table);
grTask.get(current.document_id);
grTask.work_notes = current.interaction.work_notes.getJournalEntry(-1);
grTask.update();
var attachment = new GlideSysAttachment();
attachment.copy('interaction', current.interaction.sys_id, current.document_table, current.document_id);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2024 07:07 AM
Hey,
I'm trying to use this as well but i'm getting an "Invalid Value on Insert" error message and the worknotes are applying twice to the incident. I'm using the script you provied and I've set the BR to run before insert and only runs on insert. Not sure what I'm missing here. Any help would be greatly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 09:11 AM
This is not working at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 12:19 PM
Just used this in Rome and it worked with 0 problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2022 09:41 PM
Solution worked for me in Quebec, but stopped working after upgrading to San Diego. I need to change the Business rule to 'async' with order '150' (to make it to run as last). Hope it would help if anyone else face similar problem after San Diego upgrade.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2022 04:52 PM
The BR was working in Rome. We have now upgraded to Tokyo and it has stopped working. Tried changing the BR to 'async' with order '150' as suggested for San Diego but it still does not work.
In Tokyo, SN has added the part of copying attachments from the interaction to the incident in the 'Create Incident' UI Action. However, this does not copy the work notes from the interaction.
Any ideas?