AnsweredAssumed Answered

How to set conditional readOnly field for Inline Edit ?

Question asked by Shyam Gaikwad on Aug 19, 2016
Latest reply on Aug 24, 2016 by Shyam Gaikwad

Hello Team,

 

I want to set conditional based readonly field, I did for record view through - custom/Extension/modules/Accounts/Ext/Dependencies

Please see below sample code which is working fine for record view but not on inline edit

$dependencies['Accounts']['lock_account_fields'] = array(
'hooks' => array("edit"),
'trigger' => 'not(equal($account_type,""))',
'triggerFields' => array('account_type'),
'onload' => true,
'actions' => array(),
);

 

For inline edit, I have overrided below file and code, but somehow "_validationComplete" function is not triggering.

Pathcustom\modules\Accounts\clients\base\fields\editablelistbutton\editablelistbutton.js

({
extendsFrom:'EditablelistbuttonField',
initialize: function(options) {
   this._super("initialize", [options]);
},
_validationComplete: function(isValid) {
   this._super('_validationComplete',[isValid]);
},
_render: function() {
      this._super('_render');
}
})

Outcomes