Create Opportunity from email - problem with field 'Contact'
Collapse
X
-
Something's still wrong, Contacts are still not linked to Opportuity. My workflow looks like attached. What I doing wrong?1 PhotoLeave a comment:
-
Hi,
Should be something like this:
targetEntity\attribute() - formula to retrieve attribute from the target entity of Workflow. In your case it is Email.PHP Code:$ids = record\findOne('Contact', 'createdAt', 'desc', 'emailAddress=', targetEntity\attribute('from')); entity\addLinkMultipleId('contact', $ids);
'from' - field that should contain a 'From' email address. If it won't work you can try 'fromAddress' instead.
entity\addLinkMultipleId('contact', $ids); - link name should starts from lowercase.Leave a comment:
-
Thank you Maximus for the answer. Could you give more information on how to use the record \ findOne function to capture ContactID from email?Hello,
I think it's not a bug. There's a hard logic behind the scene.
Try to use Formula here to fetch a Contact ID and then add it to the Contacts link-multiple field.
- To get users ID try to use the 'record\findOne' function https://docs.espocrm.com/administrat...#recordfindone
- To add the fetched contact ID to the Contacts field try to use the entity\addLinkMultipleId function https://docs.espocrm.com/administrat...linkmultipleid.
PHP Code:$ids = record\findOne(???) entity\addLinkMultipleId('Contact', $ids);Leave a comment:
-
Hello,
I think it's not a bug. There's a hard logic behind the scene.
Try to use Formula here to fetch a Contact ID and then add it to the Contacts link-multiple field.
- To get users ID try to use the 'record\findOne' function https://docs.espocrm.com/administrat...#recordfindone
- To add the fetched contact ID to the Contacts field try to use the entity\addLinkMultipleId function https://docs.espocrm.com/administrat...linkmultipleid.
Leave a comment:
-
Create Opportunity from email - problem with field 'Contact'
Hello,
I would like to create Opportunity when I get new email on specified email adress.
I relete Many-to-Many email with Contact and create attached workflow for email (after create).
Name, Account, Description are coppied correctly. I habe problem with field Contact. Why Contact form email can't be coppied to Conntact in Opportunity? It is bug?
Thank you for any help.
1 PhotoTags: None

Leave a comment: