- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2020 08:23 AM
Hi! what configuration do I need to work on if I want a parent's case's files/attachments or even comments, copied/duplicate to its child task?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2020 08:29 AM
Hey Paul,
I built a pretty easy UI Action on the Task form to do something like this.
Here is what I have - check it out and see if it works for you or not.
UI Action:
Script:
GlideSysAttachment.copy(current.parent.sys_class_name, current.parent, current.getTableName(), current.sys_id);
current.update();
action.setRedirectURL(current);
gs.addInfoMessage("Attachments have been added!");
gsftSubmit(null, g_form.getFormElement(), 'sysverb_update_and_stay');
And I also gave this UI action a required role as being the HR Basic.
Edit: I feel bad - did not even explain what this is doing. (sigh, c'mon Rob!!!)
So, This UI Action does the attachments. It copies all attachments from the HR Case onto the HR Task as a one-off. The person that does this, can be either the HR Case (parent) Assigned To OR the Assigned To of the child HR Task.
For Ex:
Here I have my own Password Reset Process that I built for our organization. I have a Word Doc attached to the Parent Case.
If I create a Task, I will see the UI Action 'Grab Attachments':
As you can see. there are no attachments yet on this Task. Once I click the button:
Attachment has been added to the Task form.
Now, I understand the reasoning behind wanting to grab attachments easily - but what is the reasoning behind wanting to copy over comments from Case to Task?
Cheers,
-Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2020 08:29 AM
Hey Paul,
I built a pretty easy UI Action on the Task form to do something like this.
Here is what I have - check it out and see if it works for you or not.
UI Action:
Script:
GlideSysAttachment.copy(current.parent.sys_class_name, current.parent, current.getTableName(), current.sys_id);
current.update();
action.setRedirectURL(current);
gs.addInfoMessage("Attachments have been added!");
gsftSubmit(null, g_form.getFormElement(), 'sysverb_update_and_stay');
And I also gave this UI action a required role as being the HR Basic.
Edit: I feel bad - did not even explain what this is doing. (sigh, c'mon Rob!!!)
So, This UI Action does the attachments. It copies all attachments from the HR Case onto the HR Task as a one-off. The person that does this, can be either the HR Case (parent) Assigned To OR the Assigned To of the child HR Task.
For Ex:
Here I have my own Password Reset Process that I built for our organization. I have a Word Doc attached to the Parent Case.
If I create a Task, I will see the UI Action 'Grab Attachments':
As you can see. there are no attachments yet on this Task. Once I click the button:
Attachment has been added to the Task form.
Now, I understand the reasoning behind wanting to grab attachments easily - but what is the reasoning behind wanting to copy over comments from Case to Task?
Cheers,
-Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2020 10:17 AM
Thanks Rob as always! It worked for me!
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2020 10:52 AM
Hi Rob!
Further to this query, I was testing the UI action (which is working!)...let's say the first time I clicked on the Grab attachment button, the parent case had attachment A, B, and C.
So I go to the task and click on "Grab attachment" --the attachments A, B, and C were copied from the parent case to the child task.
And then later on, I put in attachment D in the parent task. I go to the child task, click on "Grab attachment". This time, all attachments --> A, B, C, and D are copied to the child task from the parent case.
At the end, I now have 2 copies of attachments A, B, and C in the child task, and 1 copy of attachment D.
Is there a way to only grab files that have not been grabbed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2021 01:26 AM
