You need to sign in to do that
Don't have an account?
EJ
Sending template e-mails in an scontrol.
I realize this is unsupported currently, but is there any way to create a new template e-mail and have it send immediately from an scontrol? I'm already creating the new e-mail, but currently it just opens into a standard send e-mail window and I can't find any URL parameter to just have it send the e-mail without requiring a second click.
What I'm currently doing:
window.location.href = "/email/author/emailauthor.jsp?retURL=%2F{!Contact_ID}&rtype=003" + "&p2_lkid={!Contact_ID}&new_template=1&nosave=0&template_id=";
I could of course handle this outside an scontrol with an external web server and a custom link, but I'd prefer to handle everything within an scontrol to keep it contained within SFDC.
Is there any way to do what I want (supported or not) or am I stuck with manual intervention or an external solution?
BTW, adding &save=1 to that URL causes an internal server error, not sure if save=1 is supposed to work and is just currently broken or is just an unexpected URL parameter for this page that causes an error.
Thanks,
E.J.
What I'm currently doing:
window.location.href = "/email/author/emailauthor.jsp?retURL=%2F{!Contact_ID}&rtype=003" + "&p2_lkid={!Contact_ID}&new_template=1&nosave=0&template_id=";
I could of course handle this outside an scontrol with an external web server and a custom link, but I'd prefer to handle everything within an scontrol to keep it contained within SFDC.
Is there any way to do what I want (supported or not) or am I stuck with manual intervention or an external solution?
BTW, adding &save=1 to that URL causes an internal server error, not sure if save=1 is supposed to work and is just currently broken or is just an unexpected URL parameter for this page that causes an error.
Thanks,
E.J.
i recently had occasion to work thru this problem,
only just got it to work and got pulled away.
this is in an scontrol,
// so put this function in the body onoad="initPage()"
function initPage() {
var form = document.getElementById('editPage');
form.elements['p6'].value = 'test'; // subject
form.elements['new_template'].value = 1;
form.elements['template_id'].value = '00X30000000buz7';// template id
form.method = "GET";
//setTimeout("window.close();",3000); // try this in a popup, otherwise reload()?
form.submit();
}
// then in the HTML body of the scontrol, you paste in the actual
// HTML src from the email author form page, cleaned up to suit your taste
// ---> drop editForm here
So, now your user clicks once, launches the scontrol, browser renders
the HTML form, then calls the init page, which finds the form,
loads a template id, perhaps fills some other data like a subject
then, calls submit(), which simulates the click on the send button.
to make this worthy it will have to close the frame properly and jumpback to
the opener, or close a popup, i didn't get that far.
sounds easier than it was to get all the correct values filled in, missing
values in the form will cause the crash you reported.
I`m trying to make a scontrol to send a email using a template. I did the last but it didnt work. Can you explain again?
Here's the SControl I built for this. If it doesn't come out right feel free to e-mail me at "ej_wilburn AT kofax dot com".
Message Edited by EJ on 02-21-2006 10:54 AM
;)
All you really need is a custom link that looks like this:
Code:
https://na1.salesforce.com/email/author/emailauthor.jsp—retURL=/{!Object_ID}&p3_lkid={!Object_ID}&template_id=00X30000000uI6O&save=1
The 'save=1' at the end will auto send the e-mail
hope this helps
Very helpful !!
Currently I have an e-mail template (Alert) that is kicked off based on a rule. I'd like the ability for users to simply click a yes or no link in the email -
on click - it would fwd that email with their response to one receiver
How can this be done?:smileyindifferent:
that works fine. But one additional question:
Is it possible, to attach a document to such a mail? I already have tried with:
attach=1&file=AttachmentId
And it worked. But only, if I have send such a mail over the interface before I have tried to send it with a link and only for some hours.
It seems, that the attachmentId (starting with 00Y...) is generated dynamically, when sending a single mail to a Contact and will be deleted some hours later?
Does anybody has a idea, how to add a attachment using a other ID which is fix?
Thanks
///
Here is the link:
https://na1.salesforce.com/email/author/emailauthor.jsp?p2_lkid=******&retURL=/******&p3_lkid= ******&template_id=******&save=1
This is how it works:
Where every there is the '*****' you need to replace it with the id of the record.
[p2_lkid=] is where you would put the contact or lead id you want to recive the e-mail
ex: 'p2_lkid= 0036000000cmB8N'
[retURL=/] is where you put the id of the object you would like them to goto after the e-mail has sent
ex: 'retURL=/0036000000cmB8N'
[p3_lkid=] is where you put the id of the record you want the e-mail associated with, like with an opportunity, or account.
ex: 'p3_lkid=00130000006VfYf'
[template_id=] is the template id you wont the e-mail to use.
ex: 'template_id=00X30000000uI6O'
[save=1] is what makes the e-mail auto send.
if you dont want the e-mail to auto send just leave this off.
To get the id of any record including email templets, navigate to the record and in the url bar you should see 'https://na4.salesforce.com/' and then a combination of letter and numbers. This is the id of that record.
A final link would look like this:
ex: 'https://na1.salesforce.com/email/author/emailauthor.jsp?p2_lkid= 0036000000cmB8N&retURL=/0036000000cmB8N&p3_lkid=00130000006VfYf&template_id= 00X30000000uI6O&save=1'
if you were to make a url link on a contact page layout, it might look like this:
ex: 'https://na1.salesforce.com/email/author/emailauthor.jsp?p2_lkid= {!Contact.Id}&retURL=/{!Contact.Id}&p3_lkid={!Contact.Public_WorkshopId__c}&template_id= 00X30000000uI6O&save=1'
Let me know if this help. hope it does.
Mike