How to attach a document in the catalog task through work flow script

muktha1
Tera Guru

The requirement is to create a catalog item with a new workflow..Can anyone please guide me on attaching a document to the catalog task through workflow script?   It is  an urgent requirement.   Also please suggest if there is any other way.

 

Thanks

Muktha

 

 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Muktha,

You want to attach attachment to catalog task from workflow script? This is fine but where is the attachment stored i.e. on what table. Do you want attachment from RITM to get copied to catalog task.

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

View solution in original post

7 REPLIES 7

Hi Muktha,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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

Sandeep Kumar6
Giga Guru

Hi Muktha,

 

You can achieve this using workflow and Business rule.

use run script in workflow to run below query.

 

Copy Attachments from Record to Record

 

GlideSysAttachment.copy('sourcetable','sys_id','destinationtable','sys_id');

 

reference:

https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/script/useful-scripts/reference/r_UsefulAttachmentScripts.html

 

Mark Correct/Helpful if this solves your issue 


Thanks
Sandeep

Ankur Bawiskar
Tera Patron
Tera Patron

@muktha 

Hope you are doing good.

Let me know if I have answered your question.

I would encourage to close the thread as answered by marking appropriate response as correct & helpful so others can be benefited by this.

Regards
Ankur

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