Problem with formula record\findOne

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LuckyLouie
    Senior Member
    • Nov 2017
    • 172

    Problem with formula record\findOne

    Hello,
    I would like to extract the id of a contact with the email address: test@gmail.com
    Can someone help me find a mistake in the formula?​
    HTML Code:
    $em = 'test@gmail.com';
    $ids = record\findOne('Contact', 'createdAt', 'desc', 'emailAddress=', $em);​
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #2
    Hi LuckyLouie,

    The formula is correct, it works as it should, it was checked through the Formula Sandbox on EspoCRM v7.4.3.

    Click image for larger version

Name:	image.png
Views:	235
Size:	33.4 KB
ID:	90890

    Are you sure that there is a Contact with this email address in the instance? Does this formula work with other entities or other fields?​

    Comment

    Working...