Currently, we're manually updating the field "status" of a contact with the latest "action" of the campaign log record , using this query:
We've recently purchased the Advanced Pack to get this job done whenever a new campaign log record is being created. However, we cannot find a way to reflect the above query using a Workflow.
How is this supposed to be done in EspoCRM?
Code:
update contact set contact.status = ifnull([INDENT](select lower(campaign_log_record.action) from campaign_log_record where campaign_log_record.parent_id = contact.id order by campaign_log_record.action_date desc limit 1), 'cold')[/INDENT] where contact.do_not_contact = 0 and contact.deleted = 0;
How is this supposed to be done in EspoCRM?
Comment