…thoughts on ServiceNow and digital transformation

Post

ServiceNow HRSD Do Not Copy Attachments from HR Task to Parent Case


In some situations, you might want to create a task for an employee or another HR fulfiller and include an attachment in this task. The problem is that attachments from child HR Tasks automatically copy up to the parent case when the HR Task closes. This customization provides an option on the HR Template form to not copy the attachments to the parent.

1. On the sn_hr_core_template table, create a true/false field called u_do_not_copy_attachments_to_parent. Add this field to the form. You can also create a UI Policy to only show this field when the Table field is HR Task. Note that this field will only be visible in the Classic View

2. Add &&!current.template.u_do_not_copy_attachments_to_parent) to the beginning of the Notify HR Case owner when all task close BR as below:

if(!(current.integrating_system=='adobe_sign' && current.hr_task_type=='action_url')&&!current.template.u_do_not_copy_attachments_to_parent){ 

                                new hr_Task().updateAttachments(current);  

                }

3. When creating a new task, select a template with the Do not copy attachments to parent set to true and the attachments will not copy when the HR Task closes.