- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 04:32 AM
I have used the following script in BR after insert :
GlideSysAttachment.copy("sc_req_item", current.request_item.sys_id, "incident", current.sys_id);
But it is not working.
Please do the needful.
Regards,
Ram Prakash
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 06:28 AM
Thank you. That indicates that the incident is using the parent field to point to the RITM record. In that case, your business rule should be able to copy the attachment from the RITM to the incident record using the copy command I gave earlier if everything else is working properly.
GlideSysAttachment.copy("sc_req_item", current.parent, "incident", current.sys_id);
If not, please use the business rule debugger to ensure your business rule is triggering, or debug statements in your UI action (if that is how you are copying the file.) You may also find this video helpful for debugging:
Faster Server Side Script Development and Test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 05:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 05:45 AM
Thank you Ram.
When you said related list, I was expecting the list that appears at the bottom and displays in a slightly different format, not an embedded list. Not to worry.
Go to the form menu and select Configure> Form Layout
Next, take a screen shot of the form layout screen similar to that below and include it here. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 05:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 06:28 AM
Thank you. That indicates that the incident is using the parent field to point to the RITM record. In that case, your business rule should be able to copy the attachment from the RITM to the incident record using the copy command I gave earlier if everything else is working properly.
GlideSysAttachment.copy("sc_req_item", current.parent, "incident", current.sys_id);
If not, please use the business rule debugger to ensure your business rule is triggering, or debug statements in your UI action (if that is how you are copying the file.) You may also find this video helpful for debugging:
Faster Server Side Script Development and Test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 06:42 AM
Hello Chuck,
It is working now as per the above mentioned script.
Thanks for the help.
Regards,
Ram