<?php
$dependencies['OT_Confirmacion']['ot_numero'] = array(
'hooks' => array("edit"),
'trigger' => 'true', //Optional, the trigger for the dependency. Defaults to 'true'.
'triggerFields' => array('status'),
'onload' => true,
//Actions is a list of actions to fire when the trigger is true
'actions' => array(
array(
'name' => 'ReadOnly',
//The parameters passed in will depend on the action type set in 'name'
'params' => array(
'target' => 'ot_numero',
'value' => 'true',
),
),
),
);
[root@suitcrm Dependencies]#
Thanks in advance
You can make it so users cannot edit records by using SecuritySuite, but if you want to make it so they cannot edit specific fields:
You can make it so users can’t edit certain fields by going to : /custom/modules//metadata/editviewdefs.php
In this file, add ‘type’=>‘readonly’, to the definitions of the file you want to make readonly.
Hi John, your instructions work.
There is the problem that all users can not change the field.
Is there a way to allow the change field only at the administrator only?
Thanks
Shows you how to make fields read only depending on a user’s role.
I’d imagine that you could re-purpose this in conjunction with Security Suite’s role functionality to make it so that the field is read-only for all User roles, Except Administrator.