1. Home
  2. Docs
  3. Flexie CRM Methods
  4. findCases method

findCases method

Method

findCases — find cases for a specific entity by filtering with entity id

Description

Minimum number of  arguments for this method is two. The first argument is the entity name and the second is the entity id.

Structure of the method:

findCases('Entity Name', 'Entity Id')

Parameters

Entity Name — The entity name like contact

Entity Id— The entity id like the id of a contact

Examples

If you are creating an email template on the contacts entity, you have the contact object captured and can use its information like {{first_name}}, {{id}}, etc.

In the example below, we use the id of the contact to get all its cases.

//Find all cases for a specific contact. 
Hello {{first_name}},

{% set cases = findCases('contact',id)%}
 Your Cases: 

 {% for case in cases%}

    Title: {{case.title}} 

 {%endfor%}

//Output: Lists the title of cases for the contact with its current id

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy and subscribe to our YouTube channel Flexie CRM.

How can we help?