0

I would like to remove a custom button from an Account Page Layout, but only from the bottom. Exactly, it's a Detail Page Button / OnClick JavaScript. I'm trying to use this jquery I found here: Is there a way to restrict the buttons on a standard page to be top only, but it doesn't work.

What am I doing wrong? Pls, explain me, I'm quite new in this.

window.location='/portalc';
btn.jQuery('div.pbBottomButtons').remove();
user40993
  • 15
  • 2

1 Answers1

0

Earlier hack with JavaScript was being used as a workaround to hide buttons in standard page. But it was never officially supported by Salesforce.

To quote from documentation:

In Summer ’15 we will start removing unsupported code from HTML Area home page components. As a result, components that contain JavaScript, CSS, iframes, or other unsupported markup might stop working properly. To use JavaScript or other advanced HTML elements in your home page component, we recommend that you use a Visualforce Area component instead.

Refer this post for more details.

If it only needs to be in single place, I would use a custom link instead of a custom button.

Raul
  • 18,794
  • 5
  • 39
  • 66