How can I make any field , (one or more fields ) in the inline editing readonly.
How can i implement and make sure that this is also implemented at the subpanels lists as well.
i am using version 7.
Dependency will make readonly a field .You can use 'ReadOnly' dependency.This will work in recordView,listview and subpanel as well.
Here is sugar documentation on dependencies,Have a look
Hope this helps!.
Thank you Ajay,
After reviewing the sugar documentation I still do not understand how I would implement this.
Is there a way to set a field to ReadOnly in the In-Line Editing / Listview and the Subpanels as well.
I am using version 7.6.2
Try the below code with your case.I am making phone_mobile field to readonly,when condition lead source equals "Calls" in leads module.
$dependencies['Leads']['phone_mobile_readonly'] = array(
'hooks' => array("edit"),
//Trigger formula for the dependency. Defaults to 'true'.
'trigger' => 'true',
'triggerFields' => array('lead_source'),
'onload' => true,
//Actions is a list of actions to fire when the trigger is true
'actions' => array(
'name' => 'ReadOnly', //Action type
//The parameters passed in depend on the action type
'params' => array(
'target' => 'phone_mobile',
'label' => 'phone_mobile_label', //normally <field>_label
'value' => 'equal($lead_source,"Calls")',
Thanks for your help. I tried I cannot get to work as I do not have a condition.
In version 7.6.x we now how in-line or row editing. Example in the leads mobile I would like to make the 'phone_work' readonly.
How to implement?
Thanks you again,
Hi Peter Chimienti,
Just so I can make sure that I am not misunderstanding anything here, are you wanting the Office Phone field to always be read only to the User(s)? If so then you can just implement a Role that on Leads the Office Phone field is "Read Only". I have tested this and it correctly sets the field to read only for both the ListView and Leads subpanels, as well as setting the field to read only on the RecordView as well.
I am not sure whether you wanted the RecordView set to read only or not, or whether this should be for all Users (admin Users would ignore the Role) or just some specific Users.
I want to make the 'Office Phone' ReadOnly for all Users BUT just on the ListView.
I modified the following changed to -> \SugarCE\custom\modules\Leads\clients\base\views\list\list.php
found the field and added readonly property. It appears to work.
4 => array (
'name' => 'phone_office',
'label' => 'LBL_LIST_PHONE',
'enabled' => true,
'default' => true,
'readonly' => true,
i need to disable the inline edit in record view alone. If i put "reaonly" in record.php the field is not allowed to enter data in create section. Please anyone help me to resolve this.
Retrieving data ...