+ Start a Discussion

How to make checkbox as a read only field on standard page using S-Control?



I have a requirement to display the checkbox as a readonly field on the standard page using s-control. I have tried with the below code:

var Platinum__c = '00NQ0000000PAP9';
var platinumFld = parent.document.getElementById(Platinum__c);
platinumFld.readOnly = 'true';

Platinum is a checkbox field. The same syntax works for other text fields.


Do I need to do any change in the Id, like we do for lookup fields (including CF)? Please suggest if I miss anything on the above code.





I strongly recommend that you use the page layout or field level security to make this field read-only rather than trying to use an S-control.