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
Olivia FordeOlivia Forde 

Replace a View Page with my own page

I want to replace the  standard View page with my own page but when I do it comes up editable I need it to be View only and then ad an Edit Button
Best Answer chosen by Sonam (Salesforce Developers) 
Olivia FordeOlivia Forde
This was what I needed

<apex:PageBlock title="View Item" mode="Detailmain">

All Answers

SonamSonam (Salesforce Developers) 
Hi Olivia, can you share the code of your VF page - I understand you are using it in edit mode.
siddarth rajsiddarth raj
Buttons appearing usally depends on the permission being given to the Object your refereing on th page.
SonamSonam (Salesforce Developers) 
Olivia,

You could use the code shown in thw screehshot below to get the detail view of a record with the edit button(the buttons may vary with the level of perms user has)

User-added image<apex:page standardController="Case">
   <apex:detail subject="{!case.id}" inlineEdit="true"  relatedList="false" title="false"/> 
</apex:page>
Olivia FordeOlivia Forde
This was what I needed

<apex:PageBlock title="View Item" mode="Detailmain">
This was selected as the best answer
SonamSonam (Salesforce Developers) 
Thanks Olivia, I tried using the line u've given but not getting the expected view.
Would help if you could share the code so it will help others trying out the same.

Thanks again!