You need to sign in to do that
Don't have an account?
tengel
Lock fields/make read-only if condition met
I have what appears to be a pretty simply requirement but I am really struggling with this one...
I have a custom object and am overriding the standard Edit page with a Visualforce page. This object has custom checkbox field, Finalized__c.
I'm looking to do either one of these two things, and the preferable method would be avoid an apex controller, if possible:
I have a custom object and am overriding the standard Edit page with a Visualforce page. This object has custom checkbox field, Finalized__c.
I'm looking to do either one of these two things, and the preferable method would be avoid an apex controller, if possible:
- IF Finalized__c = TRUE, make the whole page readOnly;
- IF Finalized__c = TRUE, make field A__c, B__c, and C__c read only.
It was my mistake to read unclearly.
now i understand what you want.
i did it check this -->
Here i take my custom object name is Object_A__c and some custom fields.
If Object_A__c.Finalized__c is checked then all the fields are read only.
and if not then it'll be editable.
let me know if it helped you.
Regards
Virendra
version7.7@hotmail.com (mailto:version7.7@hotmail.com)
All Answers
Are you sure in both conditions Finalized__c 's value is TRUE ???
Regards
VIrendra
I meant that either of those solutions would be acceptable. So the full IF-statement for the first proposed solution would be: IF Finalized_c = TRUE, make the page read only, otherwise don't make the page read only. For the second proposed solution, it would: IF Finalized__c = TRUE, make field A__c read only, otherwise allow field A_c to be edited.
It was my mistake to read unclearly.
now i understand what you want.
i did it check this -->
Here i take my custom object name is Object_A__c and some custom fields.
If Object_A__c.Finalized__c is checked then all the fields are read only.
and if not then it'll be editable.
let me know if it helped you.
Regards
Virendra
version7.7@hotmail.com (mailto:version7.7@hotmail.com)