[Vtigercrm-developers] Readonly fields at record-level?
Alan Lord (News)
alanslists at gmail.com
Tue Jan 20 08:50:55 GMT 2015
On 16/01/15 12:51, Alan Lord (News) wrote:
...
> To recap, I want to be able to make a bunch of fields (in Accounts, but
> that's not important) read-only based on the value of another field in
> the record (a Picklist value as it happens). So this is record level
> control not module level or user level.
>
> Looking at the code, I can see I can override the isEditable() function
> in the Field model to return false for a given field id.
>
> But to get the information regarding the current record's value (that
> will determine if it should be read-only or not) into the Field model
> for checking, it looks like I need to pass it into the Block model first
> via the getFields() function which is called from the {Detail or Edit}
> Record Structure models...
>
> Is there an easier, or more straightforward mechanism to get the
> *current* record model (or even just a bool value) straight into the
> Field Model?
Anyone?
Thanks
Al
--
Libertus Solutions
http://www.libertus.co.uk
More information about the vtigercrm-developers
mailing list