function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
QasQas 

Need help with e-mail notification

I am trying to build a custom scontrol using which I should be able to send an e-mail with a predetermined e-mail template.

 

Here is what I have right now.

 

Custom Object Department with following fields

Department Name & Department E-mail

 

Custom Object myTasks with Department Name as a Lookup(Department).

 

Here is the e-mail template.

 

Subject: Assignment Notification: Task # {!myTask_Name} has been assigned to you.
Email Body: Greetings,

Task #: {!myTask_Name}
Subject: {!myTask_myTask_Subject}
Description: {!myTask_myTask_Description}

Click on the link to access the task: {!myTask_Link}

 

I want to add a custom link in myTask to fire off an e-mail to the proper department using the department e-mail associated to it. The idea is something simillar to what we have now in case queues and assignment rules with e-mail notifications.

 

Any help in completing this will be greatly appreciated.

Chirag MehtaChirag Mehta

Where u able to do so

I am able to do so ..but the merge fields in email template doesnt gets Populated

The following stuff successfully sends email tooo

Without using Email Template :-

var sample_SFDC_ID = "{!Sample_ID}";

var managerEmailId="003T0000005fmrv";

var requestorEmailID="xyz@gmail.com";

var url="/email/author/emailauthor.jsp?retURL=/"+sample_SFDC_ID+"&"+

"p2_lkid="+managerEmailId+"&"+          // This takes a contact id and resolves it to the first “to” entry

"p24="+requestorEmailID+"&" +           // sets the ‘additional to’ field. Here is where you can aggregate all the email fields from your record

"p6=Some+subject&"+                   

"p7=This is the body of the email {!Sample_ID}";

window.parent.document.location.href=url;

Using Email Template :-

var sample_SFDC_ID = "{!Sample_ID}";

var emailTemplate = "00XT0000000qwas";

var managerEmailId="003T0000005fmrv";

var requestorEmailID=xyz@gmail.com;

 var url="/email/author/emailauthor.jsp?retURL=/"+sample_SFDC_ID+"&"+

"template_id="+emailTemplate+"&"+      //Replace with your template ID

"p2_lkid="+managerEmailId+"&"+          // This takes a contact id and resolves it to the first “to” entry

"p24="+requestorEmailID+"&" +           // sets the ‘additional to’ field. Here is where you can aggregate all the email fields from your record

"p6=Some+subject&"+                   

"p7=This is the body of the email {!Sample_ID}";

Addtional Fields you have

new_template: Set to 1 if you want to include the attachment that your template may have, otherwise set to zero or exclude this parm

 

save :set to any value and the email is sent automatically. Exclude the parm to review the page and then press send

 

p3_lkid: sets the ‘related’ to drop down box and value correctly

 

p4: the cc email

 

p5: the bcc email

 

But i want to use a email template while sending email with the email template having the merge fields of the Entity /Object on which the link for sending Email will be.

 

Message Edited by Chirag Mehta on 11-09-2006 02:47 AM