I have created a custom button on a custom object with the purpose of sending an email to a fixed email address (admin). I have used the forum examples to create that button and I understand it pretty well ... EXCEPT ... I can not figure out how to pre-populate the primary "To" field for where the email is to be sent. When I run the button, it takes me to the template and the "to" column is always blank. I've tried to populate the &p2 field with no luck. I'm also concerned about returning to the record. I'm using the 'Save' function? with different values 0, 1, 2, but the execution never gets back the template. Help is greatly appreciated. Thanks.


1 Answer 1


You said you want to send it to "fixed email address"

You don't need "To" field. "To" will correspond to "recipient" record (Contact/Lead/User) which can be referred to in the email template. For just a hardcoded mailbox use "Additional To" instead: &[email protected]

If you want to populate the "To" after all

p2 is the visible name field, "John Doe". What you need is p2_lkid=003xxxxxxx... (Contact Id for example). That's the case with hacking any lookup field - they consist of 1 visible one and few hidden ones.

and to return somewhere

&save=1 - I don't remember whether it works too, I think you should use send=1 (which is the name of the button. Anyway - that would be "send without preview". What you need is something like &retURL=%2F{!Case.Id}'; (experiment with saveURL too).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .