I have created a custom "Send an Email" button using the URL below for case Object. Is there a way to add to this to Auto-populate the "To" field to be the email address from Custom object?

&p24= test@email.com

enter image description here


You can use JS location.search to access the url query and inject it into your text value

If your url is /page.htm?x=y, you can use the following code to set the value of a text field.

var params = getUrlParams();
document.getElementById('myTextFieldId').value = params.x;
| improve this answer | |
  • Thanks @Adamo, I need populate multiple email address to TO field not from url. – Sriram Jun 12 '17 at 19:49
  • Please mark the post as helpful if I actually help you :D – Adamo Jun 13 '17 at 5:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.