create a folder in documents by formula

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

    #1

    create a folder in documents by formula

    In my app I have a yearly recurring event, for which I emit contracts. These contracts I send to the participants as attachment in an email. The contract is also saved in documents in a by year folder, which I create manually. Because of this I have to create the folder every year and have to change the id of that folder in the respective formula as well manually.
    My question: Is it possible to create a folder in documents by formula?
  • lazovic
    Super Moderator
    • Jan 2022
    • 1078

    #2
    Hi shalmaxb,

    Yes, it is possible. Example:
    Code:
    $folderId = record\create('DocumentFolder', 'name', 'New Folder');

    Comment


    • shalmaxb
      shalmaxb commented
      Editing a comment
      lazovic, thanks for the hint, I did not realize, that "folder" is also a record.
Working...