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
vaishali gvaishali g 

Can I send an email through SControl ?

Can I send an email through Scontrol? On running SControl I want to send email notification to specific users....
Can it be done usinf SControl?
If Yes then how?
 
Waiting for reply.
 
Ragards
Vaishali.
 
 
Ron HessRon Hess
The API can modify records which result in email notifications ( using worflow) , see if there is something there that you can use  
vaishali gvaishali g

Hi Ron thanx for the reply......

 can u elaborate more on how modifying records results in sending email notifications? is there any way by which i can send mails using ajax toolkit and SControls?

Regards

Vaishali.

 

Message Edited by vaishali g on 11-08-2006 08:18 PM

Venkat PolisettVenkat Polisett

Here is a sample that sends email from s-control

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<html> 
    <head> 
        <script language="javascript" src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript"></script> 
        <script> 
            <!-- 
            function initPage() { 
                sforceClient.registerInitCallback(SendEmail); 
                sforceClient.init("{!API_Session_ID}", "{!API_Partner_Server_URL_70}", true);
            } 
           
            function SendEmail()
            {
                var xmlHttp = GetXMLHTTP();
                if (xmlHttp == null)
                {
                    alert("Your browser does not support XMLHTTP. Cannot Continue...");
                    return;
                }
                // get contact id ---> replace CONTACT_ID with the id of the contact row from CONTACTS object
                // RETURN_URL     ---> this can be any object id preceeded by a slash (/)
                // TEMPLATE_ID    ---> this is the template id that you want to use for the email
                // OBJECT_ID_TO_ATTACH_TO --> id of the object that you want this email attached to; for instance CASE ID
                var url="/email/author/emailauthor.jsp?retURL=<RETURN_URL>&template_id=<TEMPLATE_ID>&new_template=1&p2_lkid=<CONTACT_ID>" +
                        "&p3_lkid=<OBJECT_ID_TO_ATTACH_TO>&save=1";      
                xmlHttp.open("GET", url, false);
                xmlHttp.send(null);
                alert("Successfully Sent Email");
                return;
   
            }
            function GetXMLHTTP()
            {
                var xml = null;
                // Mozilla
                if (window.XMLHttpRequest)
                {
                        xml = new XMLHttpRequest();
                }
                // IE
                else if (window.ActiveXObject)
                {
                        xml = new ActiveXObject("Microsoft.XMLHTTP");
                }
                return xml;
            }
            //-->
        </script> 
    </head> 
    <body onload="initPage()"> 
    </body> 
</html>
vaishali gvaishali g

hi Venkat

Thanx for the reply.....will try out with this......

The_FoxThe_Fox
Hello,

Code Below (old school before ajaxbeta 3.3, too lazy to rewrite it):

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>

<title></title>

<link href="/css/ie_global.css" rel="stylesheet" type="text/css">
<link href="/css/ie_navigation.css" rel="stylesheet" type="text/css">



<link href="/css/campaigns_styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<script language="JavaScript">

var sessionid = "{!API_Session_ID}";
var CallReportId = "{!Call_Report_ID}";
var record = "003";
var UserId = "{!User_ID}";
var UserName = "{!User_FullName}";
var MainContactId = "{!Call_Report_Contact_ID}";
var AccountId = "{!Call_Report_Account_ID}";
var OppId = "{!Call_Report_Opportunity_ID}";
var apiServer = "{!API_Enterprise_Server_URL_50}";
var retUrl = "https://emea.salesforce.com/" + CallReportId;
var SoapHeader ='<—xml version="1.0\" encoding=\"UTF-8\"–>';
SoapHeader += "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">";
SoapHeader += "<soapenv:Header>";
SoapHeader += "<ns1:SessionHeader soapenv:mustUnderstand=\"0\" xmlns:ns1=\"urn:enterprise.soap.sforce.com\">";
SoapHeader += "<ns2:sessionId xmlns:ns2=\"urn:enterprise.soap.sforce.com\">" + sessionid + "</ns2:sessionId>";
SoapHeader += "</ns1:SessionHeader>";
SoapHeader += "</soapenv:Header>";
SoapHeader += "<soapenv:Body>";

var SoapFooter = "</soapenv:Body>";
SoapFooter += "</soapenv:Envelope>";

var agt = navigator.userAgent.toLowerCase();
var is_gecko = (agt.indexOf('gecko') != -1);
var is_ie = (agt.indexOf("msie") != -1);
var Results = new Array();

if (is_ie){
var xmlReq = new ActiveXObject("Microsoft.XMLHTTP");}
else { var xmlReq = new XMLHttpRequest(); }

function Record()
{
this.Id = '';
}
function deleteId(ids)
{

var delCommand = SoapHeader;
delCommand += "<delete xmlns=\"urn:enterprise.soap.sforce.com\">";
for (var j=0;j<ids.length;j++)
{
delCommand += "<ids>" + ids[j] + "</ids>";
}

delCommand += "</delete>";
delCommand += SoapFooter;
xmlReq.open("POST", apiServer, false);
xmlReq.setRequestHeader("Content-Type","text/xml");
xmlReq.setRequestHeader("SOAPaction","delete");
xmlReq.send(delCommand);
}
function query(qryname, fields,sfobject,whereclause)
{
var fieldstring = "";
for (var j=0;j<fields.length;j++) {
if (fieldstring == "") {fieldstring = fields[j] ;}
else {fieldstring += "," + fields[j];};
}
var queryCommand = SoapHeader;
queryCommand += "<query xmlns=\"urn:enterprise.soap.sforce.com\">";
queryCommand += "<queryString>Select " + fieldstring + " from " + sfobject + " where " + whereclause + "</queryString>";
queryCommand += "</query>";
queryCommand += SoapFooter;
xmlReq.open("POST", apiServer, false);
xmlReq.setRequestHeader("Content-Type","text/xml");
xmlReq.setRequestHeader("SOAPaction","query");
xmlReq.send(queryCommand);
var xmlDoc = xmlReq.responseXML.documentElement;
var objNodeList = xmlDoc.getElementsByTagName("records");
var sfid = "";
for (var j=0;j<objNodeList.length;j++){
for (var k =0;k<objNodeList.item(j).childNodes.length;k++){
if (is_ie) {
var field = objNodeList.item(j).childNodes.item(k).text;}
else {
if (objNodeList.item(j).childNodes.item(k).childNodes.length>0)
{var field = objNodeList.item(j).childNodes.item(k).firstChild.nodeValue;}
}
switch(objNodeList.item(j).childNodes.item(k).nodeName)
{
case "sf:Id":
Results[qryname][field] = new Record;
for (var x=1;x<fields.length;x++) {
Results[qryname][field][fields[x]]='';
}
Results[qryname][field].Id = field;
sfid = field;
break;
default :
if (objNodeList.item(j).childNodes.item(k).nodeName.substring(0,3) == 'sf:') {
node = objNodeList.item(j).childNodes.item(k).nodeName.substring(3,objNodeList.item(j).childNodes.item(k).nodeName.length);
Results[qryname][sfid][node]= field;
}
break;

}
}
}
}


function cancelForm() {
document.editPage.docancel.value = '1';
window.parent.parent.location.href = "/"+CallReportId;
}

function trim(str)
{
str=str.replace(/"/g, "&quot;");
str=str.replace(/\u2018/g, "'");
str=str.replace(/\u2019/g, "'");
str=str.replace(/\u201c/g, "&quot;");
str=str.replace(/\u201d/g, "&quot;");
str=str.replace(/\n/gm,"<br>");
str=str.replace(/\r\n/gm,"<br>");
return str;
//(/\n/g, “<br />”);
}
function submitForm() {
var deleteids = new Array();
Results['Task'] = new Array;
clause = "WhoId='00320000002Ece0'";
fld = ['Id'];
query('Task',fld,'Task',clause);
var j=0;
for (var x in Results['Task'])
{
deleteids [j] = Results['Task'][x].Id;
j++;
}
deleteId(deleteids);
document.editPage.docancel.value = '0';
document.editPage.nosave.value = '0';
document.editPage.save.value = '1';
document.editPage.phfont.value = 'Font';
document.editPage.phsize.value = 'Size';
document.editPage.p24.value = '';
document.editPage.p23.value = CallNotes;
document.editPage.p5.value = '';
document.editPage.p4.value = cc_list;
document.editPage.p6.value = CallSubject;
document.forms['editPage'].submit();
}
</script>


<div id="subjecth" style="position:absolute; visibility:hidden">{!Call_Report_Subject}
</div>
<div id="bodyh" style="position:absolute; visibility:hidden">{!Call_Report_Call_Notes}
</div>
<script language="JavaScript">

var txt="";

if (is_ie) {
Results['CN'] = new Array;
fld = ['Id','Call_Notes__c'];
clause = "Id='" + CallReportId + "'";
query('CN',fld,'Call_Report__c', clause);
var CallNotes = '';
for (var x in Results['CN'])
{
CallNotes += Results['CN'][x].Call_Notes__c;
}
CallNotes=trim(CallNotes);

}
else
{
var CallNotes = trim(document.getElementById('bodyh').innerHTML);
}
var CallSubject = "Call Report: " + document.getElementById('subjecth').innerHTML.toString();
var fld = new Array();
// Account
if (AccountId !='') {
Results['Account'] = new Array();
fld = ['Id','Name','Site'];
clause = "Id = '" + AccountId + "'";
query('Account',fld,'Account', clause);
var AcctInfo = "";
for (var x in Results['Account'])
{
AcctInfo += Results['Account'][x].Name + " " + Results['Account'][x].Site;
}

}
else {AcctInfo="";}
AcctInfo = "<strong>Account: </strong>" + AcctInfo;
// Opportunity
if (OppId !='') {
Results['Opp'] = new Array();
fld = ['Id','Name'];
clause = "Id = '" + OppId + "'";
query('Opp',fld,'Opportunity', clause);
var OppInfo = "";
for (var x in Results['Opp'])
{
OppInfo += Results['Opp'][x].Name;
}

}else {OppInfo="";}
OppInfo = "<strong>Opportunity: </strong>" + OppInfo;
//Internal Attendees = User
Results['Internal Attendees'] = new Array();
fld = ['Id','User__c'];
clause = "Call_Report__c='" + CallReportId + "'";
query('Internal Attendees',fld,'Internal_Attendee__c',clause);
Results['User'] = new Array();
fld = ['Id','FirstName','LastName','Email'];
clause = "";
for (var x in Results['Internal Attendees'])
{
if (clause == "") {clause = "Id='"+ Results['Internal Attendees'][x].User__c + "'";}
else {clause += " OR Id='" + Results['Internal Attendees'][x].User__c + "'";}
}
query('User',fld,'User',clause);
var int_attendees = "";
for (var x in Results['User'])
{
if (int_attendees == "") {int_attendees = Results['User'][x].FirstName + " " + Results['User'][x].LastName;}
else {int_attendees += ", " + Results['User'][x].FirstName + " " + Results['User'][x].LastName;}
}
// Attendees = Contact

Results['Other Contact'] = new Array();
fld = ['Id','Contact__c'];
clause = "Call_Report__c='" + CallReportId + "'";
query('Other Contact',fld,'Other_Contact_Attendee__c',clause);
fld = ['Id','LastName','FirstName'];
clause = "";
for (var x in Results['Other Contact'])
{
clause += "OR Id='" + Results['Other Contact'][x].Contact__c + "'";
}
clause = "Id ='" + MainContactId + "'" + clause;
Results['Contact'] = new Array;
query('Contact',fld,'Contact',clause);
var ext_attendees = "";
for (var x in Results['Contact'])
{
if (ext_attendees == "") {ext_attendees = Results['Contact'][x].FirstName + " " + Results['Contact'][x].LastName;}
else {ext_attendees += ", " + Results['Contact'][x].FirstName + " " + Results['Contact'][x].LastName;}
}


//Distribution List = Contact
Results['Distribution List'] = new Array();
fld = ['Id','Contact__c'];
clause = "Call_Report__c='" + CallReportId + "'";
query('Distribution List',fld,'OAMS_Distribution_List__c',clause);

clause = "";
for (var x in Results['Distribution List'])
{
if (clause =="") {clause = "Id='" + Results['Distribution List'][x].Contact__c + "'";}
else {clause += " OR Id='" + Results['Distribution List'][x].Contact__c + "'";}
}
Results['Dist Contact'] = new Array;
fld = ['Id','Email'];
query('Dist Contact',fld,'Contact',clause);
var cc_list = "";
for (var x in Results['Dist Contact'])
{
if (cc_list == "") {cc_list = Results['Dist Contact'][x].Email;}
else {cc_list += "; " + Results['Dist Contact'][x].Email;}
}
for (var x in Results['User'])
{
if (cc_list == "") {cc_list = Results['User'][x].Email;}
else {cc_list += "; " + Results['User'][x].Email;}
}
CallNotes = AcctInfo + "<br>" + OppInfo + "<br><strong>Attendees: </strong>" + ext_attendees + ".<br>" + "<strong>Internal Attendees: </strong>" + int_attendees + ".<br><br>" + CallNotes;
</script>

<form action="/email/author/emailauthor.jsp" method="post" name="editPage" id="editPage" target="_top">
<input type="hidden" name="template_id" id="template_id" value="">
<input type="hidden" name="new_template" id="new_template" value="0">
<input type="hidden" name="id" id="id" value="00Y20000000qBSp">
<script language="JavaScript">
document.write("<input type='hidden' name='retURL' id='retURL' value='/"+CallReportId+"'>");
document.write("<input type='hidden' name='save_new_url' id='save_new_url' value='/email/author/emailauthor.jsp˜retURL=%2F'"+CallReportId+"'>");
</script>
<input type="hidden" name="nosave" id="nosave" value="0">
<input type="hidden" name="docancel" id="docancel" value="0">
<input type="hidden" name="rtype" id="rtype" value="003">
<input type="hidden" name="p3_mlktp" id="p3_mlktp" value="001">
<input type="hidden" name="p3" id="p3" size=20 maxlength=80 value="">
<input type="hidden" name="p3_mod" id="p3_mod" value="0">
<input type="hidden" name="p3_lkold" id="p3_lkold" value="null">
<input type="hidden" name="p3_lktp" id="p3_lktp" value="001">
<input type="hidden" name="p3_lspf" id="p3_lspf" value="0">
<input type="hidden" name="p3_lkid" id="p3_lkid" value="000000000000000">
<table width="35%" border=0 cellspacing=1 cellpadding=0 id="ep">
<tr id="btn">
<td colspan=5 align=center>
<input type="button" name="send" value="Send" class="button" onclick="javascript:submitForm();">&nbsp;&nbsp;&nbsp;
<input type="button" name="cancel" value="Cancel" class="button" onclick="javascript:cancelForm();">
</td>
</tr>
<tr>
<td colspan=5>&nbsp;</td>
</tr>
<tr id="head_1_ep">
<td class="bodyBold" colspan=4 nowrap>View Email:</td>
<td nowrap colspan=1 align=left><img src="/img/required_icon.gif" border="0" alt="Required Information" title="Required Information" width=18 height=18 align="texttop"><span class="bodySmallBold"> = Required Information</span></td>
</tr>
<tr>
<td class="blackLine" colspan=5><img src="/s.gif"></td>
</tr>
<tr>
<td nowrap class="requiredInput">To:</td>
<td>
<script language="JavaScript">
if (is_ie) {
document.write ("<input name=\"p2\" id=\"p2\" type=\"text\" size=20 maxlength=80 readonly=\"true\" style=\"background:#EBEBEA\" value=\"Call Report\">");
}
else {
document.write ("<input name=\"p2\" id=\"p2\" type=\"text\" size=20 maxlength=80 readonly=\"true\" value=\"Call Report\">");
}
</script>

</td>
</tr>
<tr>
<td nowrap valign=top class="dataLabel">CC:</td>
<td valign=top colspan=4>
<script language="JavaScript">
if (is_ie) {
document.write ("<textarea readonly=\"true\" style=\"background:#EBEBEA\" wrap=\"soft\" name=\"p4\" id=\"p4\" rows=\"2\" cols=\"67\">" + cc_list + "</textarea>");
}
else {
document.write ("<textarea readonly=\"true\" wrap=\"soft\" name=\"p4\" id=\"p4\" rows=\"2\" cols=\"67\">" + cc_list + "</textarea>");
}
</script>
</td>
</tr>
<tr>
<td nowrap class="requiredInput">Subject:</td>
<td colspan=4>
<script language="JavaScript">
if (is_ie) {
document.write ("<input name=\"p6\" id=\"p6\" type=\"text\" style=\"background:#EBEBEA\" size=70 maxlength=300 readonly=\"true\" value=\"\">");
}
else {
document.write ("<input name=\"p6\" id=\"p6\" type=\"text\" size=70 maxlength=300 readonly=\"true\" value=\"\">");
}
</script>
</td>
</tr>
<tr>
<td nowrap valign=top class="dataLabel">Body:</td>
<td valign=top colspan=4 style="background:#EBEBEA">
<script language="JavaScript">
document.write (CallNotes);
</script>
</td>
</tr>
<tr>
<td colspan=5><img src="/s.gif" height=3></td>
</tr>
<tr id="btn">
<td colspan=5 align=center>
<input type="button" name="send" value="Send" class="button" onclick="javascript:submitForm();">&nbsp;&nbsp;&nbsp;
<input type="button" name="cancel" value="Cancel" class="button" onclick="javascript:cancelForm();">
</td>
</tr>
</table>
<input type="hidden" name="p2_mod" id="p2_mod" value="0">
<input type="hidden" name="p2_lkold" id="p2_lkold" value="Call Report">
<input type="hidden" name="p2_lktp" id="p2_lktp" value="003">
<input type="hidden" name="p2_lspf" id="p2_lspf" value="0">
<input type="hidden" name="p2_lkid" id="p2_lkid" value="00320000002Ece0">
<input type="hidden" name="p5" id="p5" value="">
<input type="hidden" name="p23" id="p23" value="">
<input type="hidden" name="p24" id="p24" value="">
<input type="hidden" name="phfont" id="phfont" value="Font">
<input type="hidden" name="phsize" id="phsize" value="Size">
<input type="hidden" name="textmode" value="r">
<input type="hidden" name="save" value="1">
<input type="hidden" name="deleter_id" value="">
<input type="hidden" name="deleter_type" value="">
</form>
<script language="JavaScript">
document.editPage.p6.value = CallSubject;
</script>
</body>
</html>

 

Chirag MehtaChirag Mehta

Already at http://community.salesforce.com/sforce/board/message?board.id=scontrols&message.id=1063


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


Ron WildRon Wild
For those of you interested in creating HTML emails from an s-control, there are two more parameters to know about:
  • textmode - "t" or "r" for "text" or "rich text" (HTML) modes
  • p23         - HTML content string for use in rich text mode
Just include textmode=r and p23="< ... html string >" with you other parameters to create an HTML email:

/email/author/emailauthor.jsp?retURL=%2F" + {!Contact_ID} + "&textmode=r&p3_lkid=" + {!Account_ID} + "&p2_lkid=" + {!Contact_ID}+ "&p6=" + "subject" + "&p23=" + messageBody;

There is a limit to the number of characters you can pass through the URL string, however you can "push" your HTML
directly from the s-control to the rich text editor once the form is open to get around the limitation. 

Here's a sample s-control that does just that:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <title>HTML Email S-Control</title>
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript"></script>

<script type="text/javascript">

function initPage() {
    sforceClient.registerInitCallback(beginBuild);
    sforceClient.init("{!API_Session_ID}", "{!API_Partner_Server_URL_70}");
}

function beginBuild() {
    //Pause briefly before doing queries to generate email content - long enough for progress bar image to load.
    setTimeout( "createEmail()" , 90);
}

var emailContent;

function createEmail() {
    emailContent = "<div style='margin-left:40px;margin-top:40px;'>";
    emailContent += "<img src='http:\/\/www.google.com\/intl\/en_ALL\/images\/logo.gif' style='border:thin solid;'>";
    emailContent += "<br \/><a href='http:\/\/www.google.com'>Click here to go to Google<\/a><\/div>";
    openEmailForm();    
    setTimeout("pushHTML()", 1700 );    
}

function openEmailForm()
{
    var returnId = "{!Contact_ID}";
    var whatId = "";
    var whoId = "{!Contact_ID}";
    var subject = "Email Subject";
    var messageBody = "";          // Note: Smaller html strings may be passed as part of the URL string
    opener.location.href = "/email/author/emailauthor.jsp—retURL=%2F" + returnId + "&textmode=r&p3_lkid=" + whatId + "&p2_lkid=" + whoId+ "&p6=" + subject + "&p23=" + messageBody;
}

function pushHTML () {
    var iframe = opener.document.getElementById('iframe_p23');
    if (iframe) {
        iframe.contentWindow.document.body.innerHTML = emailContent;
    }
    self.close();
    return true;
}

</script>    

</head>

<body onload="initPage();">
<div id="transcriptLoading" >
    <p id="loadingMessage">Building HTML email ... </p>
<img src="/servlet/servlet.ImageServer–oid=00D500000006b96&id=01550000000BBwa">
</div>
</body>
</html> 

 

ClintProdClintProd
Would someone be willing to post an update to this based on the Winter 07 changes with the AJAX toolkit? Thanks.
IrfanIrfan
Hi,
 
I have 2 types of situations that im stuck in,...
 
1. I have to add some fields to the "Send An Email" screen, is that possible with the current available screen in the salesforce ?.
2. I found that i can override it with my custom S-Control. I have used the source of the original screen in my s-control and customized it. but i am stuck in a problems, that is:
 
     When i type some text in the body of the email, and save it in the description of a new Task , the body of the email brings the HTML tags along with the text like :
 
             <P>asasdasdas</P>
             <P>dasd</P>
            <P>asd</P>
            <P>ada</P>
             <P>da</P>
            <P>da</P>
            <P>dasd</P>
    
Please guide if there is any solution to this problem.
 
Regards,
Irfan Shahid.
 
 
marie.tournemarie.tourne
I am trying to migrate the code in current version of AJAX.

How does the function:
 sforceClient.registerInitCallback(beginBuild);
is translated in 13.0 version ?
Chirag MehtaChirag Mehta
Find Complete Detail on Migration @
http://www.salesforce.com/us/developer/docs/ajax/Content/sforce_api_ajax_beta.htm
@ http://www.salesforce.com/us/developer/docs/ajax/Content/sforce_api_ajax_beta.htm


Message Edited by Chirag Mehta on 08-19-2008 10:09 PM
Cool_DevloperCool_Devloper
Hi Ron,
 
Your post is indeed very helpful and useful.
 
I was trying to use the IFrame functionality which you have specified :
Code:
function pushHTML () {
    var iframe = opener.document.getElementById('iframe_p23');
    if (iframe) {
        iframe.contentWindow.document.body.innerHTML = emailContent;
    }
    self.close();
    return true;
}

 
But i am not able to get any value in the field "iframe_p23". Would be great if you can help me out with this. Am i missing something?
 
Any help would be highly appreciated.
 
Thanks
pbreitpbreit
Is this whole functionality documented anywhere? Like what are all the possible p2 parameters, etc?