Method

findOne — finds a record on a specific entity by searching with field value.

Description

Minimum number of  arguments for this method is three. The first argument is the entity name and the other two are Field Alias – Field Values pair that will filter the result. The Field Alias can be a unique identifier field and the Field Value is its value.

This method says “Find lead with email equal to john.smith@gmail.com” where lead is the entity, email is the field alias followed by the value. This method will return one record that matches the defined filters.

Structure of the method:

findOne('Entity Name', 'Field Alias', 'Field Value')

Parameters

The first argument is always Entity Name like for example “lead” or “contact”. You can add as many pair arguments as you want.

Examples

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