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
Dolly GadhveDolly Gadhve 

Hi all .... How to hide edit/Delete button from related list?

I have created a vf page in which data is coming from 3 objects.
Lets say A is the parent and B,C are child of A
When I go to A object detail page , A object standard edit and delete buttons are displaying along with B and C object edit/Delete button.

My requirement is we need to hide edit/delete button from related list (B and C object)

But we should able to edit B and C object after navigating to the customized edit page of A object.
Vinod ChoudharyVinod Choudhary
Hi Dolly,

Those are links, not the buttons. I think You can either removed Edit, Delete permission to that object from profiles OR you need to override the Edit and Delete button using VF page.

Thanks
Vinod
Dolly GadhveDolly Gadhve
How to override the Edit and Delete button using VF page


Thankx
Dolly
Vinod ChoudharyVinod Choudhary
Hi,

Try this.
<apex:pageBlockButtons >
	<apex:commandButton action="{!edit}" value="Edit" id="editButton" />
	<apex:commandButton action="{!URLFOR($Action.OBJ.delete,YOUR_RECORD_ID,[retURL=Your_return_URL])}" value="Delete" id="deleteButton" />
</apex:pageBlockButtons>
Thanks
Vinod