Hi,
I have created one user-defined screen and on that screen, there are some bunch of fields and I want when someone selects specific text in a lookup field which is APPROVED in my case some fields should be protected.
It is happening correctly but when I refresh that screen everything is getting change as it was before like all fields which were protected that again get enabled.
---------------------------------------------------------------------------------------------------------
Ext.define('EAM.custom.external_wscrew', {
extend: 'EAM.custom.AbstractExtensibleFramework',
getSelectors: function () {
return {
'[extensibleFramework] [tabName=HDR][isTabView=true] [name=wspf_10_bud_status]': {
before_eam_customonblur: function (field, lastValues) {
var budgetStatus= field.getValue(),
vFormPanel = field.formPanel;
if (budgetStatus== "APPROVED") {
EAM.Builder.setFieldState({'wspf_10_bud_mrc': 'protected'}, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({'wspf_10_bud_udfdate01': 'protected'}, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({'wspf_10_bud_udfdate02': 'protected'}, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({'wspf_10_bud_cord': 'protected'}, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({'wspf_10_description': 'protected'}, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({'wspf_10_bud_code': 'protected'}, vFormPanel.getForm().getFieldsAndButtons());
return false;
}
}
}
};
}
}
);
--------------------------------------------------------------------------------------------------------------------------------
I hope that you got my point, it would be very great if someone help me out.
Thanks & Regards,
Manoj Dubey