Well, I've been struggling the whole day to make this happen.
I have a custom button, that calls a custom VFP, this VFP has an apex:commandbutton, that sents an email (method from the controller) and redirect you to DocuSign() via onClick attribute, now the requirement is, that the custom button from page record just sents the email and redirect to DocuSign.
I have tried everything and still can make it happen, added JQuery but whenever I try I got errors.
This is my VFP.
I don't know what else to do, I've tried a lot of things, tried to make in onLoad attribute at body tag.
This is the error I'm currently getting.
Uncaught TypeError: Cannot read property 'click' of null at redirect.
Thanks in advance.