EspoCRM 9.1 introduces several powerful updates to its formula capabilities, making workflow automation more efficient and flexible. These enhancements allow users to streamline complex calculations and data manipulations directly within their CRM. Let’s explore the key changes:
Return the Last Expression
Now, the last evaluated expression in a formula script is automatically returned. This simplifies scripts where the formula is used to evaluate a condition or determine a value.
$a = 1;
$b = $a + 1;
$b;
In this example, the value of $b (which is 2) would be returned without needing an explicit return statement.
Increment & Decrement Operators
EspoCRM 9.1 adds support for increment (++) and decrement (–) operators, applicable only to variables:
$a = 1;
$a++;
$a--;
Array Appending with [] Syntax
The new version introduces a more intuitive way to append elements to arrays:
$list = list();
$list[] = 'a';
These formula enhancements in EspoCRM 9.1 provide developers and power users with more tools to create sophisticated business logic and automation. The simplified syntax reduces code complexity while maintaining full functionality.
Need help implementing these new formula features in your EspoCRM instance? Our team of experts can assist with customization, implementation, and training. Contact us today to discuss your CRM needs.