Save generated PDF to a specified Document Folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1828

    #1

    Save generated PDF to a specified Document Folder

    I generate a PDF by formula and want to save it right away into a previousliy created Folder. I succeed in saving it to the Documents, bit it won`t get into the folder I specified. Here is my formula to create the record in Documents:

    Code:
    record\create(
    'Document',
    'type', 'myDocument',
    'categoryId','67617422acca98140', //ID of the Folder
    'name', 'myDocumentsName',
    'fileId', $pdfId
    );
    It does not work with the name "categoryId" and also not with "folder" or "DocumentFolder".
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9611

    #2
    I believe you need to use 'folderId' instead.

    Comment


    • shalmaxb
      shalmaxb commented
      Editing a comment
      Thanks, yuri, that was it. Has to be folderId
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9611

    #3
    Note that you need also to set the 'field' attribute in the Attachment record. It should be set to 'file' in your case.

    Comment

    Working...