Send HR Case Attachments to HR Task easily

Rob Sestito
Mega Sage

Hey there SN Comm!

I am looking to see if anyone knows a good way to develop a UI Action (possibly), that can basically do the following:

Take attachment(s) from HR Case, and move them to the HR Task (when needed).

While this is not a huge deal, our Employee Resource Center Reps, are having to open attachments from the HR Case form, save them to their computer, and then when they create the HR Task, they will then manually add them to the Task. Again, this is not a huge deal - we're just looking to save a little time/mouse clicks.

if anyone knows of something/has ideas, please share!

Thanks all!!

-Rob

1 ACCEPTED SOLUTION

GlideSysAttachment is not available client side. I'm not sure what the person above suggested that. Try it without client.

View solution in original post

13 REPLIES 13

rad2
Mega Sage

Hello,

I think the following would be one way to do it

- create a client callable UI action
- Use GlideSysAttachment.copy to copy all attachments that are available for the HRCase to the HRTask. More information on GlideSysAttachment - https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_SGSA-copy_S_S_S_S
- If they have to be moved and not copied then i guess changing the table_sys_id and table_name to the HRTask would be sufficient.

 

p.s - I havent tried this out in my instance.

Hope this helps!

Thanks for you reply rad - I will see what I can do.

Cheers,

-Rob

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Rob,

Use an UI action which is server side and have following script:

so you need to copy all the attachments on HR case to individual HR Tasks

 

do you know which column in HR tasks refers HR case so that you can query with it?

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks for you reply Ankur - however, I don't see the script in which you stated is there. Are you able to post again?

Cheers!

-Rob