If you have developed an extension to Vault Explorer, you probably noticed the HiddenCommands() function in the IExtension interface. The theory behind this function is that your extension can overwrite a command by hiding it from the menus and providing a replacement command. It's a good theory on paper, but does it hold up in practice?
I've written two apps that make use of this feature, with varying degrees of success.
Recycle Bin 2.0 hides the Delete command in an attempt to force a new process. Things didn't work out too well when I deployed this on our internal Vault. Delete is a pretty fundamental operation. If you are going to remove something like that, you'd better have something good as a replacement. Unfortunately, Recycle Bin wasn't up to the challenge, and I reverted things after a few weeks.
Hyperlink Maestro hides the Copy Hyperlink command and replaces it with a better one. This time things worked out better. Mainly because the new function does everything the old one does and more. So end users are not losing anything by having the extension installed. Personally, I can't go back to the default command. I'm hooked on Maestro.
Here are some alternatives to hiding a command:
- Place your new command alongside the default command.
- Use events to work with the existing command instead of trying to hide it.
If you still want to use the hidden commands feature, here are some best practices:
- Don't hide a function unless you can provide a superior replacement.
- Don't override a function unless you fully understand it's functionality. Even something that seems simple, like Delete, can have uses that you didn't consider.
- Most functions are too cost prohibitive to override. Copy Hyperlink was easy to do, but something like Copy Design would take months to write.