findRelatedOne not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bradaks
    Active Community Member
    • Aug 2017
    • 251

    findRelatedOne not working

    Can anyone help me figure out what I am doing wrong?

    I have a workflow with this action on a custom entity (has a many-to-many relationship with contacts):
    $zips = entity\attribute('assignmentsAddressPostalCode')
    $assid = entity\attribute('id')
    $contactid = record\findRelatedOne('Contact', entity\attribute('id'), 'assignments', 'createdAt', 'desc', 'id=', $assid, 'zipcodes=', $zips)

    record\relate('Assignment', $assid, 'contacts', $contactid)
  • yuri
    Member
    • Mar 2014
    • 8448

    #2
    You missed a semicolon after every line. The rest looks correct.
    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...