Can I setup custom buttons on Contacts page using post install script? And remove it using uninstall script?

I would like to remove the buttons administrators have setup during installation of they are to uninstall the app. Right now they have to remove all of them manually.

  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Sep 9, 2022 at 5:35

1 Answer 1


No, you cannot. That would require your postinstall script to access the Metadata API or Tooling API, which it cannot do because it has no Session Id.

As I note in the linked answer, this would be fairly risky anyway - postinstall scripts are notoriously hard to debug, and mutating the org's metadata is itself complicated and high-risk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .