Skip to main content
edited tags
Link
Source Link

Is there any way to remove overrides for standard buttons by APEX code?

I'm developing the managed package, which contains some extended lwc form for new account creation.

Reassign "new" button on account object is manual operation (after managed package instalation): enter image description here During testing in scratch org, I have found, that after the uninstalling my package, I cant reassign "new" button behavior, and see an error: acc buttons edit I want to use apex UninstallScript class, to check "new account button" behavior.

My questions:

  1. Is there a way to check behavior of standard new account button by apex code?
  2. Is there a way to delete override of standard new account button by apex code?
  3. Is there a way to stop uninstall the managed package process with an error message?
  4. Is there some another way to solve my problem? May be some best practises?