+ Start a Discussion
nksfnksf 

Delete Custom Button

HI guys,
I need to create Custom Delete Button. I belive it requires Java Script and I need your help with this.
I need this Button on Activity Object (Task and Events) 
We have multiple Record Types of Activity Object. But I need this button on only 1 page layout related to one of the Record Type. 
Example: 
Object Name: Activity
Record Type Names: Record Type A      Record Type B     Record Type C
So I need this button on Page Layout which is related to B Record Type
User Roles; Sales Rep Manager           Sales Rep Director 
Requirement is that only Users in Sales Rep Manager Role and Sales Rep Director Role and System Admins should be able Delete Activities using this Custom Delete Button. All other users should not be able to delete Activity Records using this button. 
Abhishek BansalAbhishek Bansal
In order to achieve this, please follow the steps :
  1. Create a custom button as per your requirement.
  2. If you do not have a separate page layout for Record Type B than create a new page layout and add this new button on this newly created page layout.
  3. Now Click on Page Layouts for your obejct and move on Page Layout Assignment Section
  4. Select the Profiles which belongs to the user to whom you want to show this Delete Button.
  5. For record type B replace the PageLayout with your new Page Layout for selected profiles.
Please let me know if any point is not clear to you or you need more clarification.

Regards,
Abhishek.