Add new button and functionality in detail view

I, i need to add a new button and when the user clicks it invokes a function i made, i have not clear the process and in the forum i cannot see a post that show me the way to do it.

Is in SuiteCRM 7.8.2

Thanks for