how to hide approve/Reject links in the home page?

how to hide approve/Reject links in the home page?




We can hide the approve/Reject links, If we want to restrict the user to approve the record from home page.

If we have implemented logic for the approval process (customized approval process) for that we have to override the all the links (Approve links) and buttons in the details page.

How we can restrict the user to approve from home page.

Steps:

  • Create a StaticResouce “StaticResourceName” upload a JS file. (File extension should be .JS)

var j$ = jQuery.noConflict();

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

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

});

  • go to Setup > Home > Custom Links
  • create a new link call it “HideApproveLink”
  • Behaviour = “Execute JavaScript”
  • Content Source = “Onclick JavaScript”
  • at the body enter {!REQUIRESCRIPT(“/resource/StaticResourceName”)}
  • go to Setup > Home > Home Page Components à New
  • call it “HideApproveLink-Box”
  • pick type “Links”
  • click next
  • pick “HideApprovalLink” we created above à save
  • got to Setup > Home > Home Page Layouts
  • add “HideApprovalLink-box” to your layout
  • Click on home Tab you can see the Approva/Reject links are hidden in the page.



We can create a home page component and written script to hide the links. But from summer ‘15 we don’t have the capability to write the script in home page component.





Leave a Reply