0 votes

We want a related .PDF attachment for each .DOCX template generated invoice.
Can we do this in workflow/serverscript?

asked in WorkFlow / Serverscript by (125 points)

1 Answer

0 votes

You can use the convertAttachmentToPdf method on each file that you want to convert to PDF.

Edit the document, loop through files and fetch the K_FILE and K_VERSION of the to be converted file. Provide the editHandle, k_File and version to the method as parameters.

The method returns the K_FILE of the inserted attachment.

Requirement is that PDF conversion is already configured, of course :-)

answered by (7.3k points)
1,231 questions
1,500 answers
328 users