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

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

Hi Ankur,

WE have the document attached in the service catalog item. Can it be attached to catalog tasks created through workflow? I am not very familiar with this. Please help.

 

Thanks

 

 

Hi Muktha,

Yes in workflow you can attach the document from RITM to Catalog task provided the task is already created or else system won't know to which catalog task to attach.

Better to have before insert business rule on catalog task and have following script:

GlideSysAttachment.copy('sc_req_item',current.request_item, 'sc_task', current.sys_id);

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

@muktha 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

 

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