Hide your Approve, Reject link Salesforce.com homepage : In the processes of Hiding approve, reject link in salesforce.com home page we have two steps. They are.

  1. Creating static resource with .Js extension.
  2. Customizing Home page.

What is Static Resource in Salesforce.com ?

In salesforce.com, Static resources are those which are used to store images, files, documents, pdf document, archived, Zip files, style sheets, JavaScript files and so on. All these files are uploaded to static resources in salesforce.com to use in visualforce pages as a reference.

When images or file is uploaded to static resource we have to enter name where these names are validated when visualforce page is compiled. When visualforce page is compiled it prevents in creating invalid static resources.

  • We can upload maximum size of  file to static resources is 5MB for single static resource.
  • We have maximum for static resources in salesforce.com is 250MB only.

Hide your Approve, Reject link Salesforce.com homepage

 How to upload files to Static Resources in Salesforce.com ?

To upload files or images to Static Resources in salesforce.com follow the steps given below.

Go to Develop=>Static Resources.

Creating Static Resources in Salesforce.com

Click on Static resources as shown above.

Creating Static Resources in Salesforce.com

Click on New button to create new Static resource in Salesforce.com.

Creating Static Resources in Salesforce.com

  • Enter the name for the static resource. The name must not contain spaces, alphanumeric characters, must be unique, name must begin with letter.
  • Description is optional.
  • Click on Choose file button to upload images, files, documents to resources.
  • Select cache control as private.

We have two option in cache control value in Static resources they are private and public.

If cache control is Public :- When creating static resources in Salesforce.com, Static resources data cached on saelsforce.com server will be shared to other user in our organization. It has no security and can be used by any user in an organization.

If cache control is Public :- If cache control is selected as private no Static Resource image are filed is shared with users in an organization. We have set cache control as private only.

Hide your Approve, Reject link Salesforce.com homepage.

  • Now we have to upload a file with static .Js extension to static resource.
  • Copy and paste the code in notepad and save as .Js extension.

var j$ = jQuery.noConflict();

j$(document).ready(function(){

j$(“table.list td.actionColumn”).html(”);

});

  • Now customize your home pages as shown below.

Go to Setup=>Home=>Custom links.

Creating Custom links on sidebar

Go to Setup=>Customize=>Home=>Custom Links.

Creating Custom links on sidebar to open in New Window

Now click on New.

Creating Custom links on sidebar to open in New Window

Now a new window will be opened.

hide approve button in salesforce home page

  • Click on Save button to save the settings.

Creating new home page components.

To create home page components go to Setup=>Create=>Home page components=>new.

hide approve button in salesforce home page

Hide your Approve, Reject link Salesforce.com homepage
Hide your Approve, Reject link Salesforce.com homepage

Click on new button to create new home page component. Now a new page will be opened where we have to enter all the details as shown below.

  • Enter the name as Hideapprovelink-Box.
  • Select the type as link.
  • Select next button.
  • Select the link Hideapprovallink which has been created in our first step.

Removing buttons from page layout.

This is our final step in the processes of hiding  Approve, Reject link in  Salesforce.com homepage.

Go to Setup=>Customize=>Home=>Home page layout.

Hide your Approve, Reject link Salesforce.com homepage

Click on home page layouts link as shown above. A new page will be opened to create new home page layout, to edit the default page layout. Now we have to edit the existing home page layout to add hideapprovallink-box to our home page layout.

Hide your Approve, Reject link Salesforce.com homepage

  • Click on Edit button.
Hide your Approve, Reject link Salesforce.com homepage

Now we can see approver / reject buttons in home page will be hidden.