I planning to use custom button. I can write all the functionality related to button using Javascript API, so that i do not need to write any apex code.
Another way is i can write an apex class and invoke those apex methods in the custom button.
Which one will be the best way?
Any suggestions? Thanks for helping me to clarify.