Attach a PDF form to a catalog task

hamidouche
Kilo Guru

Hi,

I would like to attach a PDF form to a catalog task.

Context: a catalog item has 5 catalog tasks. The requirement is that for the 4th catalog task, the assigned to manager must have access to a pdf form to complete.

How can I add this form in Flow designer ?

1 ACCEPTED SOLUTION

I showed an action, as inputs it gets the attachment to copy from, and the catalog task to copy to, and then copies the attachment's metadata so the catalog task "gets a copy" of the attachment.  It runs whenever you call it inside your flow.

View solution in original post

5 REPLIES 5

Tanushree Maiti
Tera Patron

Hi @hamidouche 

 

Refer: 

How Does Generate PDF Document action works on Flow Designer? 

https://www.servicenow.com/community/developer-forum/generate-pdf-document-action-in-flow-designer/m...

https://www.youtube.com/watch?v=xYttoOtLB8U

https://github.com/goranlundqvist/YouTube/tree/master/Episode%203%20-%20Create%20custom%20action%20t...

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

I don't want to generate a PDF. The pdf form already exists, my question is:

- where do I attach it? to the catalog item? to the task?

- how to make sure it shows only at catalog task 4

Assuming the attachment is already saved in the system, you can just add a record in the sys_attachment table, put sc_task for table, the catalog task' sys_id as table sys_id and then copy the rest of the fields from the original attachment...

PascalVerdieu_0-1781289038236.png

Your biggest problem will likely be to ensure that you have a good copy of the attachment and how to manage the inevitable updates that will come to it later on...

 

That being said as a quick and dirty solution to the question asked.  You may want to challenge the use of a fixed attachment.  If it is to capture data, that should be done in SN directly instead of storing that in a PDF, if it is to provide fixed data, like a how-to, a KB should suffice.

I like your solution but how can I copy the rest of the information from the original pdf?

Also, when I test the requested item, the action that creates the PDF does not run until the Task is closed, which is not acceptable per requirements.