Copy task attachment field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mark
    Senior Member
    • Dec 2019
    • 143

    Copy task attachment field

    Hi,
    I wanted to ask is it possible to duplicate the attachments field that is available in the default task entity to a custom entity? Since the field "Attachments" does not have the ability to create and attach a file from documents entity
    Attached Files
  • rabii
    Active Community Member
    • Jun 2016
    • 1250

    #2
    i think you can trace the code applied to Task and customise the code for your custom entity.
    Rabii
    Web Dev

    Comment

    • Mark
      Senior Member
      • Dec 2019
      • 143

      #3
      Found it, you need to add "Document" to source list in the custom entityDef file:

      custom/Espo/Custom/Resources/metadata/entityDefs/customEntity.json

      "attachments": {
      "type": "attachmentMultiple",
      "previewSize": "medium",
      "sourceList": ["Document"],
      "accept": [],
      "isCustom": true​

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #4
        Actually, this is available at administration > entity manager > {entity} > fields > attachments.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        Working...