[Vtigercrm-developers] Readonly fields at record-level?
Alan Lord
alanslists at gmail.com
Wed Jan 21 13:08:52 GMT 2015
On 21/01/15 12:59, Uma S wrote:
> Hi Alan,
>
> As display-type of field is deciding whether the field is enabled for
> edit in detail-view. As we can't do any changes regarding display-type
> it's better we overwrite api's related to make field editable, in module
> specific field.php and return value according to dependent fields on
> related field-value.
>
> For specific module you need to overwrite field model file.
Thanks Uma, but, and here is the real question... Once a Field model is
instantiated, how can I get access to the current record model to test
if this field should be editable or not.
As I have said the only way I have seen so far is to pass information
through three classes
{Detail,Edit}RecordStructure.php->Block.php->Field.php
Is there a way I can "read" or access the current record model from the
Field model directly?
Thanks
Alan
More information about the vtigercrm-developers
mailing list