Announcement

Collapse
No announcement yet.

Customize array field into an email template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customize array field into an email template

    Hi,

    I have created a custom object with an array field.
    Also, I want to send an email containing a record of the related object, and I don't have any problem with this.
    I can add the array field also with no problem, but I would like to be able to edit any record of this array; Is this possible?

    Example:
    This is because I want to save, into this array field, a random number lines containing, each, a URL's for images that I don't want to save properly as images or attachments into the object into the CRM since they are going to be a lot and hi-resolution; besides, the images already exists on an external bank of images.

    What I need to do is to add the HTML code for an image, and when the source attribute is necessary, I use the first row of the array field and the same for each line of the array field.

  • #2
    I'm having trouble picturing it, your explanation is fine but it difficult for me to picture what it is that you want. Are you able to draw some proof of concept to get an better idea?

    I'm no expert but I been playing with the Print2PDF and Email Template, along with manually patching of "array" type of Images & Attachment and might be able to give some insight.

    Comment


    • #3
      Hi,

      From v5.9.0 email templates additionally supports the same templating system as Print-to-PDF has. https://docs.espocrm.com/user-guide/...m-array-fields

      Comment


      • #4
        Hi espcrm , I tried before write this post to do with the yuri advice; but I didn't note the version; I need to update to v5.9.0 since I have 5.5.6; that's why the code didn't work for me; let me update it and will let you know and will explain better my question..

        Thank you both!

        Comment


        • #5
          Yes, some of the Array Printing/Email only become available in more recent version.

          Looking through the documents might give you an idea if what you want is possible (do quick search). If it is possible in Documents and not in your version then it mean Upgrade time.

          Comment


          • #6
            Hi,

            In order to upgrade..

            I've to upgrade my MariaDB version to 10 and my PHP to 7.3; now everything is working; but when I try to upgrade, the system is not allowing me because a database error; when I rebuild the system, now it says: Error 500 - Error while rebuilding database. See log file for details.

            The problem is that I've enabled the DEBUG mode in the config.sys and in the logo I'm only receiving this error:


            [2020-06-02 23:58:01] Espo.ERROR: Uncaught Exception ParseError: "syntax error, unexpected '?'" at ../application/Espo/ORM/Repositories/RDB.php line 103 {"exception":"[object] (ParseError(code: 0): syntax error, unexpected '?' at ../application/Espo/ORM/Repositories/RDB.php:103)"} []

            But that error is every minute into the log; It seems there is a problem with the CRON; but there is nothing else.

            And a quick question; I read into another post (I've been searching for a solution) that you can't have any other table into the same table; is that true? I have some other tables but never gave me any error, but, do you know if that can be the problem?
            Last edited by jorge@netcare.mx; 06-03-2020, 06:26 PM.

            Comment


            • #7
              Did you upgrade using GUI or CLI? I manage to upgrade via CLI, here is a post of my adventure. https://forum.espocrm.com/forum/anno...8424#post58424

              Not sure about your error, but why do you think it due to CRON? Doesn't look like it. Also you should filter word your website name unless you OK with people finding out about it.

              Comment

              Working...
              X