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
Nick_JoeNick_Joe 

How to hide Action in Salesforce for Specific Profile ?

Hi @all
How to hide Action in Salesforce for Specific Profile ?
User-added image
Please share your knowledge.
 
VinayVinay (Salesforce Developers) 
Hi Nick,

I don't think we can remove Edit/Del actions.  Kindly review below Idea link and vote for this feature.

https://trailblazer.salesforce.com/ideaView?id=08730000000BrqR

Please mark as Best Answer if above information was helpful so that it can help others in the future.

Thanks,
ShivankurShivankur (Salesforce Developers) 
Hi Nick,

It is not possible to remove the action column on related lists in page layouts declaratively, the number of actions available will depend on the user's Profile and its permissions on the child object, a profile with read only access will be the only one that displays no actions in the column.

So, as an option you can go with VisualForce pages replacing the standard page layouts.

Handling these in VF page will look like below,sharing as an example:
<apex:page standardController="Contact">
<apex:detail subject="{!Contact.Id}" relatedList="{!IF($Profile.Name == 'Investor User',false,true)}"/>
<apex:pageBlock title="Contributions" rendered="{!IF($Profile.Name == 'Investor User'),true,false)}">
    <apex:pageBlockTable value="{!Contact.Contributions__r}" var="item" >
        <apex:column value="{!item.Date__c}"/>
        <apex:column value="{!item.Type__c}"/>
        <apex:column value="{!item.Amount__c}"/>
    </apex:pageBlockTable>
</apex:pageBlock>
<apex:pageBlock title="Distributions" rendered="{!IF($Profile.Name == 'Investor User'),true,false)}">
    <apex:pageBlockTable value="{!Contact.Distributions__r}" var="item1" >
        <apex:column value="{!item1.Year__c}"/>
        <apex:column value="{!item1.Date__c}"/>
        <apex:column value="{!item1.Amount__c}"/>
    </apex:pageBlockTable>
</apex:pageBlock>
Hope above information helps, Please mark as Best Answer so that it can help others in the future.

Thanks.