emailaddressData formula

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maarten
    Member
    • Jun 2020
    • 56

    emailaddressData formula

    Hi,

    I'm trying to loop through the emailaddressData to see if one of the email addresses of the target entity has a specific domain name.

    When I use the API call for this target entity I see the emailaddressData is returns as an array of json 2 objects.

    However, when I go into the formula sandbox and run this on the same target entity:

    Code:
    output\printLine(array\length(emailAddressData));
    it returns 0

    Whereas If I do it on another attribute, it does return a count of 1

    Code:
    output\printLine(array\length(teamsIds));
    Does anyone know why this behavior is different on the emailAddressData, and moreover, how to parse it?
  • yuri
    Member
    • Mar 2014
    • 8417

    #2
    Hi,

    emailAddressData is a special field that is loaded separately on API calls. When it's used from formula sandbox it's not loaded.

    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

    • yuri
      Member
      • Mar 2014
      • 8417

      #3
      I'll consider adding a separate function fetching all email addresses in the future version. For now, consider finding some workaround if "emailAddressData" is not accessible from the place you run the formula.

      If it's accessible, then use object\ functions to fetch properties of email address data items.
      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

      • yuri
        Member
        • Mar 2014
        • 8417

        #4
        I added the ability to fetch emailAddressData the way you tried. In v7.3.
        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

        • Maarten
          Member
          • Jun 2020
          • 56

          #5
          yuri thanks. Any idea when 7.3 will be released?
          Last edited by Maarten; 01-09-2023, 10:11 AM.

          Comment

        • Maarten
          Member
          • Jun 2020
          • 56

          #6
          This works now, thanks!

          Comment

          Working...