We are facing issue on copying transcript from interaction to the associated incidents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2023 12:42 AM
Hi Community,
We are facing issue on copying transcript from interaction to the associated incidents.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2023 01:54 AM
Hi @rajeshKongamudi ,
Can u try the below code.It should work.
var inc = new GlideRecord('interaction_related_record');
inc.addQuery('interaction', current.sys_id);
inc.addQuery('document_table', 'incident');
inc.addQuery('type', 'task');
inc.query();
while (inc.next()) {
var incident = new GlideRecord('incident');
incident.addQuery('sys_id', inc.task);
incident.query();
if(incident.next()) {
incident.work_notes = current.transcript.toString();
//incident.comments = current.transcript.toString();
incident.update();
}
}
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2023 02:41 AM
Thanks for the reply, actually the previous code is also working the problem here is the code is not working if the incident is created when interaction is InProgress but when the interaction is closed complete and then we are trying to create incident and associating to the closed interaction then is not copying the comments. Please help me with this req. here is the run condition we are giving. and which ever code you have provided is working same as above one.