Hopefully I can explain my question clearly here.
I want to change the behavior of this button that appears on our Opportunity page:
The Opportunity object has a custom rollup field that counts the number of products associated with the opportunity. If the number of products associated with the opportunity = 0, then pressing the "New Payment" button should pop-up a message box that says something like "Eror: Cannot process a payment for an opportunity with no associated products".
The Payment object is managed, from the PaymentConnect package by Linvio. (Not sure if this impacts what I'm trying to do)
I can edit the button to override its functionality or create a custom button, but I'm having trouble. I don't want to change the overall functionality of the button. I just want to add that simple check before allowing it to continue.
Is it possible for me to write a simple override for this button that does the check I mentioned above before it punts it to the (managed) VisualForce page that the button now goes to?
I tried to create my own VisualForce page to duplicate the functionality of the one that the button currently directs to, but since it is in a managed namespace I cannot do it.
Any ideas or help would be much appreciated.