Custom button failure

Custom button failure

Hi,

I have a custom button that runs a custom function. The function looks like this:

  1. return "test message";

Nothing fancy. When I click on the button in the quotes module it does nothing. OK, so maybe the alert messaging isn't working. If I change the custom function to send an email:

  1. SendMail
  2.     [
  3.       From : zoho.adminuserid
  4.       To : zoho.adminuserid
  5.       Subject : "zoho custom function worked"
  6.       Message : "good job buddy"
  7.     ];
  8. return "message sent";

No email is sent. If I use the "Save & Execute Script" button while creating the function, then the email sends fine. Any ideas why the function fails to run when using the actual custom button?

Thanks