Hello,
How can we make calculated field editable.
Hello,
How can we make calculated field editable.
The only way you can do that is in the studio and remove the calculation. Can you tell us a bit more about the use case?
Options:
1. Switch off Sugar Logic by making the field non-calculated - e.g via Studio, then configure your own calculations with logic hooks (server side) or js (client-side), so that the field value remains editable after calculation happened
2. To change the calculated value, add an additional "adjustment" field, then extend the calc field formula to include "adjustment" field into the calculation in a way you need.
For an example of the "adjustment" field please refer to Discount Amount that makes the effect on Line Item Total in Quote Line Items
Best Regards,
Dmytro Chupylka
integroscrm.com
We make work in Sugar CRM system faster, more convenient and efficient
In order to make calculate fields editable you need to implement a Dependency SetValue instead of a sugarLogic formula via Studio.
In the trigger of dependency you need to evaluate whether it is empty or not, the way it will be calculated only if empty:
$dependencies['Quotes']['data_venda'] = array( 'hooks' => array("view", "edit"), 'trigger' => 'equal($data_venda_c,"")', 'triggerFields' => array(), 'onload' => true, 'actions' => array( array( 'name' => 'SetValue', 'params' => array( 'target' => 'data_venda_c', 'value' => 'now()' ), ), ), );
Regards