- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2015 01:38 AM
Hi All,
We upload attachment in the catalog request item, the attachment will show in the Requested Item form, see the image below, but it can't show in the Catalog Task form. We want to show all the attachments in the catalog task from like the request item form, what should we do?
Any suggestions I will very appreciate.
Regards,
Danny
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2015 12:17 AM
Hi All,
I have done this according to Neil's documentation, see it: Request item & task attachment sharing
I just modified some codes, because I want to move the RITM attachment to SC task form, here are my codes:
moveattachments();
function moveattachments() {
//get all the RITM attachments
var att = new GlideRecord('sys_attachment');
att.addQuery('table_sys_id', current.parent.sys_id);
//gs.log('RITM SYSID='+current.parent.sys_id+"------->"+current.request_item.sys_id);
att.query();
while (att.next()) {
att.table_name = 'sc_task';
att.table_sys_id = current.sys_id;
//gs.log('SYSID='+current.sys_id);
att.update();
}
}
This will update the RITM attachment to sc task, so the RITM form will not show the attachment list on the top of the form page. The attachment list will show on the top of the sc task form page.
Regards,
Danny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2015 06:30 AM
Hi,
My requirement is to copy the attachment from Request or request item to Catalog task.
I created a relationship as below but no luck. Is it anything missing in this.
Name: All Attachments
Applies to table: Catalog task (sc_task)
Queries from table: Attachment (sys_attachment)
Query with:
var qc = current.addQuery('table_sys_id', parent.sys_id);
qc.addOrCondition('table_sys_id', parent.request_item.sys_id);
qc.addOrCondition('table_sys_id', parent.request_item.request.sys_id);
current.addNotNullQuery('table_sys_id');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2015 09:09 AM
Hi Akmal,
Not sure if you got an answer yet, but I was looking into this too and I had the same problem, so I thought I'd give you an answer just in case. You need to actually add the field to your form. So right click the header and go "Configure > Form Layout". Then search for the relationship name you created and add it to your form.
Cheers,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2016 11:53 AM
Where are you placing this code?