
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2019 09:18 PM
Our customers created case via the web portal. Our engineers work in the incident. All the updates that should be visible for the customer are synchronized between case and incident. When a customer adds an attachment to the case, it is not visible in the incident. How can I make this work? I checked the forum and the documentation, but was not really able to find a solution. Thank you in advance for your help!
Solved! Go to Solution.
- Labels:
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2019 04:51 AM
My pleasure and please start working on scripting by joining the developer's learning on https://developer.servicenow.com.
Kindly,mark the answer as correct if this helps you out so,this questions could be considered as closed for other community members.
Regards,
Munender

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2019 09:27 PM
you can use GlideSysAttachment.copy(sourceTable ,source Sysid,taregt table ,target sysid ) to copy attachments from case table to incident table. May be you can write a bussiness rule on sys_attachment table , copy to incident based on relation between case / incident by evaluating conditions. In the same you can handle delete attachments as well.
If you think of script actions , use attachment.uploaded , attachment.deleted and write necessary copy and delete scripts
Mark helpful if this is helpful for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2019 09:30 PM
Hi,
write a after Business rule on the case table:
script:
var incGr = new GlideRecord('incident');
incGr.addQuery(<'field name which in on incident and refer the table(case) of which you want to copy the attachment'>, current.table_sys_id);
incGr.query();
if(incGr.next())
{
GlideSysAttachment.copy('<soruce tabele name>', current.table_sys_id, 'incident', incGr.sys_id);
}
Regards,
Munender

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2019 10:01 PM
I have one more question. What do you mean by "<'field name which in on incident and refer the table(case) of which you want to copy the attachment'"? The cases are on table "sn_customerservice_case" and the incidents on table "incident" What do you mean by field name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2019 10:58 PM
Hi,
This means a reference field of case table i.e. the field displaying the case table.
eg. on incident form caller name is field which is showing user name hence,this field is on incident and refer the user table
Regards,
Munender