function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
troungertrounger 

How to set visual force fields read only

 hi guys I am new to sales force I am trying to display my standard page in visual force page like this 

 

<apex:page standardController="Student__c">
<apex:detail subject="{!Student__c}" relatedList="false" />
</apex:page>

 

if I mention id then it displaying that page 

but I want to display that page like read only 

but when I try the previous scenario if I modify the vales in the fields those refeleting the original standerd page   

i am trying to avoid it but it is working out

 

please any one let me know how to set readonly condition for that page

 

Thanks in advance

Dhaval PanchalDhaval Panchal

try below

 

<apex:detail relatedList="false" showChatter="false" inlineEdit="false" relatedListHover="false" subject="{!Student__c}" />

 It will not allow inline editing but still delete button is enabled.

troungertrounger

Hi dapanchl

I tried but code is not working I can still edit the document 

u said that only delete button is available but here edit  delete clone every button is available