• The_Fox
  • NEWBIE
  • 75 Points
  • Member since 2005

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 179
    Replies
Hello,
I'm looking for a data dictionnary that give me information about the fields in a table (ex : opportunity) and their description (ex : string, int, date, ...).
How can I do ? with a tool or is this avalaible in SalesForce itself ?

Thank you in advance for any advice ...
  • November 22, 2006
  • Like
  • 0
Hi,

I am trying the appexchange plugin in Eclipse and I have when I wanted to save my scontrols Invalid entity type

What are the possible issue

Thanks
Hi everybody,

Ok even if the display looks good when you retrieve the date in javascript the date is always considered as US style ie MM DD YYYY and not as user locale in salesforce


Regards
Hi Guys,

Just a quick question, how to have Currency field displayed with user's formating in a s-control

Does the class dataCell  CurrencyElement is enough or not?

Thanks for the tips

Regards
Hi DevAngel or Benji,

I have in my opportunity defined two custom Date Field. I am in salesforce in (GMT+01:00) Central European Time (Europe/Brussels) Time Zone.

I am using Firefox 1.5.0.1 and when I am displaying through Alert javascript the Close Date of the opportunity  the date is ok but when I am alerting the two custom date fields in the alert it is taking the day for the month and vice versa after putting the date through the sforce.Util.ParseDate. What could be the problem and the workaround.

My PC is Romance Time Zone

The code extract:
var oppCloseDate = "{!Opportunity_CloseDate}";
var oppSerSDate = "{!Opportunity_ServicesStartDate}";
var oppSerEDate = "{!Opportunity_ServicesCloseDate}";

var oppDate = Sforce.Util.ParseDate(oppCloseDate);
    alert(oppDate);
    alert(Sforce.Util.ParseDate(oppSerSDate));
    alert(Sforce.Util.ParseDate(oppSerEDate));


Thanks for your help
Hello,

I have a date A, and I have a new date B and I would like to calculate the Diff between the two dates (B- A) (the diff could possibly be negative) and apply the diff to another date C so that new C= C+ (B-A).
All dates are converted first in ISO format if it can help

Second point I want to update different sforce objects can I pass something like updateObjects (Objects X; Objects Y; Objects Z) or I need to make updateObjects(Objects X), updateObjects(Objects Y)...

Thanks for your help

Cheers
Hi,

I am making this query in the sforce explorer
Select AmountInherited, CreatedById, CreatedDate, CurrencyIsoCode, ForecastCategoryInherited, Id, LastModifiedById, LastModifiedDate, OpportunityId, OutOfDate, OverrideAmount, OverrideComment, OverrideForecastCategory, OverridePeriodId, OverrideQuantity, OwnerId, PeriodInherited, QuantityInherited, SystemModstamp from OpportunityOverride where LastModifiedDate>2006-02-20T00:00:00.000Z and I have 216 results

The same one in sforce Excel Connector 153 rows return (sforce excel connector 6.15)
For both the 7.0 Endpoint otherwise this table is not avalaible

Hope you can provide help

Regards
Hello,

I have created a new object named Countries and I would like to have that the country field on adresses looks up on this custom objects. Is it possible ? I hope so because otherwise not to be able to restrict the countries the users are entering is a mess

Thanks
Hello,

there is an error in Ajax beta 2

Error: this.fieldsToNull has no properties
Source file: https://www.sforce.com/ajax/beta2/dynalib.js
Line: 143

Regards
Hi Benji,

I am using beta2 located on sforce and I have error in IE and Firefox in IE Appforce and Time Object not defined

and on Firefox

Error: missing ( before formal parameters
Source file: https://www.sforce.com/ajax/beta2/datehandler.js
Line: 433, Column: 17
Source code:
function Appforce.Util.LZ(x) {return(x9?"":"0")+x}

Error: time_object is not defined
Source file: https://www.sforce.com/ajax/beta2/sforceclient.js
Line: 302
If this can help

Thanks
Hi Ron,

I have an issue with textarea fields. I am trying to get the values from some textarea fields to automate some beautiful reports for our top management and only the 1021 or 1022 characters. So if you can have a look at it to be able to bring back all the textarea (that is a max of 32000 Characters.

Regards

PS: Office 2003 win xp sp2
  • September 27, 2005
  • Like
  • 0
Hello,

I had heard rumors about the new offline version (based on a embedded database + custom objects) being delivered during dreamforce. What about This? Some news?

Regards
  • September 22, 2005
  • Like
  • 0
Hello DevAngel,

Would it be possible to have records sorted with an option into the query by as many fields (at least two) as we want when we wake sforceclient.Query

for example sforceclient.Query(SOQL_Query,sorting_field1,sorting_field2) or
sforceclient.Query(SOQL_Query,sorting_field) with sorting field being an array.

or something like sforceclient.Querysorted(SOQL,sorting_field)


I have some recursive quick sort scripting in javascript if you want them

contact me chumbert at odyssey-group dot com

Regards
Hello,

I am using the sforce client on sandbox.sforce.com

and this
var qr = sforceClient.Query("Select Id, Name, Site from Account where Name='OAMS' AND Site 'Swiss' AND Siteis not working.

For example when I alert qr.size it shows undefined

Nevertheless this one is working

var qr = sforceClient.Query("Select Id, Name, Site from Account where Name='OAMS'");


and the above queries are working in the sforce explorer

Regards
As usual replace [ by < and ] by >

[!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 {
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 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 for (var k =0;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 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, """);
str=str.replace(/\u2018/g, "'");
str=str.replace(/\u2019/g, "'");
str=str.replace(/\u201c/g, """);
str=str.replace(/\u201d/g, """);
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.p6.value = CallSubject;
document.editPage.submit();
window.parent.parent.location.href = "/"+CallReportId;
}
--]
[/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;


txt +="[form action=\"/email/author/emailauthor.jsp\" method=\"post\" name=\"editPage\" id=\"editPage\"]";
txt +="[input type=\"hidden\" name=\"template_id\" id=\"template_id\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"new_template\" id=\"new_template\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"id\" id=\"id\" value=\"00Y20000000qBSp\"]";
txt +="[input type=\"hidden\" name=\"retURL\" id=\"retURL\" value=\"/00320000002Ece0\"]";
txt +="[input type=\"hidden\" name=\"nosave\" id=\"nosave\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"docancel\" id=\"docancel\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"save_new_url\" id=\"save_new_url\" value=\"/email/author/emailauthor.jsp?retURL=%2F00320000002Ece0&rtype=003&p2_lkid=00320000002Ece0\"]";
txt +="[input type=\"hidden\" name=\"rtype\" id=\"rtype\" value=\"003\"]";
txt +="[table width=\"35%\" border=0 cellspacing=1 cellpadding=0 id=\"ep\"]";
txt +="[tr id=\"btn\"]";
txt +="[td colspan=5 align=center]";
txt +="[input type=\"button\" name=\"send\" value=\"Send\" class=\"button\" onclick=\"submitForm();\"]   ";
txt +="[input type=\"button\" name=\"cancel\" value=\"Cancel\" class=\"button\" onclick=\"cancelForm();\"][/td]";
txt +="[/tr][tr][td colspan=5] [/td][/tr]";
txt +="[tr id=\"head_1_ep\"]";
txt +="[td class=\"bodyBold\" colspan=4 nowrap]View Email:[/td]";
txt +="[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]";
txt +="[/tr][tr][td class=\"blackLine\" colspan=5][img src=\"/s.gif\"][/td][/tr]";
txt +="[tr]";
txt +="[td nowrap class=\"requiredInput\"]To:[/td][td]";
if (is_ie) {
txt +="[input name=\"p2\" id=\"p2\" type=\"text\" size=20 maxlength=80 readonly=\"true\" style=\"background:#EBEBEA\" value=\"Call Report\"]";
}
else {
txt +="[input name=\"p2\" id=\"p2\" type=\"text\" size=20 maxlength=80 readonly=\"true\" value=\"Call Report\"]";
}
txt +="[input type=\"hidden\" name=\"p2_mod\" id=\"p2_mod\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"p2_lkold\" id=\"p2_lkold\" value=\"Call Report\"]";
txt +="[input type=\"hidden\" name=\"p2_lktp\" id=\"p2_lktp\" value=\"003\"]";
txt +="[input type=\"hidden\" name=\"p2_lspf\" id=\"p2_lspf\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"p2_lkid\" id=\"p2_lkid\" value=\"00320000002Ece0\"][/td]";
txt +="[/tr]"
txt +="[input type=\"hidden\" name=\"p3_mlktp\" id=\"p3_mlktp\" value=\"001\"]";
txt +="[input type=\"hidden\" name=\"p3\" id=\"p3\" size=20 maxlength=80 value=\"\"]";
txt +="[input type=\"hidden\" name=\"p3_mod\" id=\"p3_mod\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"p3_lkold\" id=\"p3_lkold\" value=\"null\"]";
txt +="[input type=\"hidden\" name=\"p3_lktp\" id=\"p3_lktp\" value=\"001\"]";
txt +="[input type=\"hidden\" name=\"p3_lspf\" id=\"p3_lspf\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"p3_lkid\" id=\"p3_lkid\" value=\"000000000000000\"]";
txt +="[tr]";
txt +="[td nowrap valign=top class=\"dataLabel\"]CC:[/td]";
if (is_ie) {
txt +="[td valign=top colspan=4][textarea readonly=\"true\" style=\"background:#EBEBEA\" wrap=\"soft\" name=\"p4\" id=\"p4\" rows=\"2\" cols=\"67\"]" + cc_list + "[/textarea][/td]";
}
else {
txt +="[td valign=top colspan=4][textarea readonly=\"true\" wrap=\"soft\" name=\"p4\" id=\"p4\" rows=\"2\" cols=\"67\"]" + cc_list + "[/textarea][/td]";
}
txt +="[/tr]";
txt +="[tr][td nowrap class=\"requiredInput\"]Subject:[/td]";
if (is_ie) {
txt +="[td colspan=4][input name=\"p6\" id=\"p6\" type=\"text\" style=\"background:#EBEBEA\" size=70 maxlength=300 readonly=\"true\" value=\"\"][/td][/tr]";
}
else {
txt +="[td colspan=4][input name=\"p6\" id=\"p6\" type=\"text\" size=70 maxlength=300 readonly=\"true\" value=\"\"][/td][/tr]";
}
txt +="[tr][td nowrap valign=top class=\"dataLabel\"]Body:[/td]";
txt +="[td valign=top colspan=4 style=\"background:#EBEBEA\"]"+CallNotes+"[/td]";
txt +="[/tr][tr][td colspan=5][img src=\"/s.gif\" height=3][/td][/tr]";
txt +="[tr id=\"btn\"]";
txt +="[td colspan=5 align=center]";
txt +="[input type=\"button\" name=\"send\" value=\"Send\" class=\"button\" onclick=\"submitForm();\"]   ";
txt +="[input type=\"button\" name=\"cancel\" value=\"Cancel\" class=\"button\" onclick=\"cancelForm();\"][/td]";
txt +="[/tr][/table]";
txt +="[input type=\"hidden\" name=\"p5\" id=\"p5\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"p23\" id=\"p23\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"p24\" id=\"p24\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"phfont\" id=\"phfont\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"phsize\" id=\"phsize\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"textmode\" value=\"r\"]";
txt +="[input type=\"hidden\" name=\"save\" value=\"1\"]";
txt +="[input type=\"hidden\" name=\"deleter_id\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"deleter_type\" value=\"\"]";
txt +="[/form]";
document.write(txt);
document.editPage.p6.value = CallSubject;


[/script]
[br]
[/body]
[/html]
Hello All,

Is there a way to have the overriden Forecast Category in a report

Regards
Hello,

I would have some feedback of people using Cardscan and salesforce.com like best parctices,
the do not things list and the do list and so on


Regards
Hi,

Normally an new offline version supporting more records and custom objects as well was supposed to be out

Is there any official release date on this?

Thanks
Hello,

I would like to know if it is possible to report in someway on reports utilization gloablly, by user, by date....

Thanks in advance
This is working like a charm in IE but not in Firefox please help

This was working in Firefox before when only text email were available regards

Replace the [ by < abd the ] by > or email me at chumbert at odyssey-group.com and I can send you the original file.

Thanks a lot in advance

[!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 {
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 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]";
var qc = "Select " + fieldstring + " from " + sfobject + " where " + whereclause ;
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 for (var k =0;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 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)
{
return str.replace(/"/g, """);
//(/\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.submit();
window.parent.parent.location.href = "/"+CallReportId;
}
--]
[/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="";
var CallNotes = document.getElementById('bodyh').innerHTML.toString();
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;
}
}
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;
}
}
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;


txt +="[form action=\"https://emea.salesforce.com/email/author/emailauthor.jsp\" method=\"post\" name=\"editPage\" id=\"editPage\"]";
txt +="[input type=\"hidden\" name=\"template_id\" id=\"template_id\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"new_template\" id=\"new_template\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"id\" id=\"id\" value=\"00Y20000000qBSp\"]";
txt +="[input type=\"hidden\" name=\"retURL\" id=\"retURL\" value=\"/00320000002Ece0\"]";
txt +="[input type=\"hidden\" name=\"nosave\" id=\"nosave\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"docancel\" id=\"docancel\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"save_new_url\" id=\"save_new_url\" value=\"/email/author/emailauthor.jsp?retURL=%2F00320000002Ece0&rtype=003&p2_lkid=00320000002Ece0\"]";
txt +="[input type=\"hidden\" name=\"rtype\" id=\"rtype\" value=\"003\"]";
txt +="[table width=\"35%\" border=0 cellspacing=1 cellpadding=0 id=\"ep\"]";
txt +="[tr id=\"btn\"]";
txt +="[td colspan=5 align=center]";
txt +="[input type=\"button\" name=\"send\" value=\"Send\" class=\"button\" onclick=\"submitForm();\"]   ";
txt +="[input type=\"button\" name=\"cancel\" value=\"Cancel\" class=\"button\" onclick=\"cancelForm();\"][/td]";
txt +="[/tr][tr][td colspan=5] [/td][/tr]";
txt +="[tr id=\"head_1_ep\"]";
txt +="[td class=\"bodyBold\" colspan=4 nowrap]View Email:[/td]";
txt +="[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]";
txt +="[/tr][tr][td class=\"blackLine\" colspan=5][img src=\"/s.gif\"][/td][/tr]";
txt +="[tr]";
txt +="[td nowrap class=\"requiredInput\"]To:[/td][td]";
if (is_ie) {
txt +="[input name=\"p2\" id=\"p2\" type=\"text\" size=20 maxlength=80 readonly=\"true\" style=\"background:#EBEBEA\" value=\"Call Report\"]";
}
else {
txt +="[input name=\"p2\" id=\"p2\" type=\"text\" size=20 maxlength=80 readonly=\"true\" value=\"Call Report\"]";
}
txt +="[input type=\"hidden\" name=\"p2_mod\" id=\"p2_mod\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"p2_lkold\" id=\"p2_lkold\" value=\"Call Report\"]";
txt +="[input type=\"hidden\" name=\"p2_lktp\" id=\"p2_lktp\" value=\"003\"]";
txt +="[input type=\"hidden\" name=\"p2_lspf\" id=\"p2_lspf\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"p2_lkid\" id=\"p2_lkid\" value=\"00320000002Ece0\"][/td]";
txt +="[/tr]"
txt +="[input type=\"hidden\" name=\"p3_mlktp\" id=\"p3_mlktp\" value=\"001\"]";
txt +="[input type=\"hidden\" name=\"p3\" id=\"p3\" size=20 maxlength=80 value=\"\"]";
txt +="[input type=\"hidden\" name=\"p3_mod\" id=\"p3_mod\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"p3_lkold\" id=\"p3_lkold\" value=\"null\"]";
txt +="[input type=\"hidden\" name=\"p3_lktp\" id=\"p3_lktp\" value=\"001\"]";
txt +="[input type=\"hidden\" name=\"p3_lspf\" id=\"p3_lspf\" value=\"0\"]";
txt +="[input type=\"hidden\" name=\"p3_lkid\" id=\"p3_lkid\" value=\"000000000000000\"][/td]";
txt +="[tr]";
txt +="[td nowrap valign=top class=\"dataLabel\"]CC:[/td]";
if (is_ie) {
txt +="[td valign=top colspan=4][textarea readonly=\"true\" style=\"background:#EBEBEA\" wrap=\"soft\" name=\"p4\" id=\"p4\" rows=\"2\" cols=\"67\"]" + cc_list + "[/textarea][/td]";
}
else {
txt +="[td valign=top colspan=4][textarea readonly=\"true\" wrap=\"soft\" name=\"p4\" id=\"p4\" rows=\"2\" cols=\"67\"]" + cc_list + "[/textarea][/td]";
}
txt +="[/tr]";
txt +="[tr][td nowrap class=\"requiredInput\"]Subject:[/td]";
if (is_ie) {
txt +="[td colspan=4][input name=\"p6\" id=\"p6\" type=\"text\" style=\"background:#EBEBEA\" size=70 maxlength=300 readonly=\"true\" value=\"\"][/td][/tr]";
}
else {
txt +="[td colspan=4][input name=\"p6\" id=\"p6\" type=\"text\" size=70 maxlength=300 readonly=\"true\" value=\"\"][/td][/tr]";
}
txt +="[tr][td nowrap valign=top class=\"dataLabel\"]Body:[/td]";
txt +="[td valign=top colspan=4 style=\"background:#EBEBEA\"]"+CallNotes+"[/td]";
txt +="[/tr][tr][td colspan=5][img src=\"/s.gif\" height=3][/td][/tr]";
txt +="[tr id=\"btn\"]";
txt +="[td colspan=5 align=center]";
txt +="[input type=\"button\" name=\"send\" value=\"Send\" class=\"button\" onclick=\"submitForm();\"]   ";
txt +="[input type=\"button\" name=\"cancel\" value=\"Cancel\" class=\"button\" onclick=\"cancelForm();\"][/td]";
txt +="[/tr][/table]";
txt +="[input type=\"hidden\" name=\"p5\" id=\"p5\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"p23\" id=\"p23\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"p24\" id=\"p24\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"phfont\" id=\"phfont\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"phsize\" id=\"phsize\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"textmode\" value=\"r\"]";
txt +="[input type=\"hidden\" name=\"save\" value=\"1\"]";
txt +="[input type=\"hidden\" name=\"deleter_id\" value=\"\"]";
txt +="[input type=\"hidden\" name=\"deleter_type\" value=\"\"]";
txt +="[/form]";
document.write(txt);
document.editPage.p6.value = CallSubject;
[/script]
[br]
[/body]
[/html]
Hello

Feel free to improve it and then share it with everybody

Please replace [ and ] where you normally should have < and > (that is on html or xml tags

Code guys

[!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"]
[html]
[head]

[title][/title]
[script language="JavaScript"]
[!--
var sessionid = "{!API_Session_ID}";
var apiServer = "{!API_Enterprise_Server_URL_50}";
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);
// This will be a double dimension array of objects called Record (Record could be seen has a salesforce object)
var Results = new Array();

//here I create the XML Http Request
if (is_ie){
var xmlReq = new ActiveXObject("Microsoft.XMLHTTP");}
else { var xmlReq = new XMLHttpRequest(); }

//here I create the salesforce object with only id as property for the moment
function Record()
{
this.Id = '';
}

//You have to send an array of Ids to this function and the objects are deleted provided you have the right to do so
function deleteId(ids)
{

var delCommand = SoapHeader;
delCommand += "[delete xmlns=\"urn:enterprise.soap.sforce.com\"]";
for (var j=0;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);
}

/*Here you have a standard query in javascript
you have to pass the queryname as a String
fields as an Array of the field you want in your Select
sfoject as a String representing the Salesforce Object
whereclause as a string with your clause already built (without the where)*/
function query(qryname, fields,sfobject,whereclause)
{
var fieldstring = "";
for (var j=0;j if (fieldstring == "") {fieldstring = fields[j] ;}
else {fieldstring += "," + fields[j];};
}
var queryCommand = SoapHeader;
queryCommand += "[query xmlns=\"urn:enterprise.soap.sforce.com\"]";
if (whereclause=="") {
queryCommand += "[queryString]Select " + fieldstring + " from " + sfobject + "[/queryString]";
}
else {
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);
// here I am going to the root element
var xmlDoc = xmlReq.responseXML.documentElement;
// I am going to the parent of the results
var objNodeList = xmlDoc.getElementsByTagName("records");
var sfid = "";
for (var j=0;j for (var k =0;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":
// Here I create a new object and the array Results[qryname] get a new entry each time an id is discovered
Results[qryname][field] = new Record;
for (var x=1;x Results[qryname][field][fields[x]]=''; //here I extend the properties of the ojbect record with all the fields
}
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; //here I fill the properties with the matching values coming from salesforce.com
}
break;

}
}
}
}

var fld = new Array();
// exemple for Account object: I create an array Results['Account'] to store the results send by my query on Account
Results['Account'] = new Array();
// here I create the field list
//IMPORTANT: Please always include the Id Field
fld = ['Id','Name','Site'];
//Here I am constructing my clause (AccountId here is a variable)
clause = "Id = '" + AccountId + "'";
//here I am making my query
query('Account',fld,'Account', clause);
var AcctInfo = "";
//I browse through my results
for (var x in Results['Account'])
{
AcctInfo += Results['Account'][x].Name + " " + Results['Account'][x].Site;
}
/*
In fact with this snippet and the construction of the multidimensionnal array Results you can store all the results of you query so that you can retrieve them later on in th code.

*/
// here an example of the combined use of delete and query function
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);
[/script]
[/body]
[/html]
I have a custom link on a page that takes me to the edit page of another custom object. I want to pre-populate the fields on the new page with data from the originating page. I'm having trouble with a date/time field. The receiving field needs the date/time to be formatted as MM/DD/YYYY HH:MM AM/PM,
but when I use the merge field from the sending page as follows:
 
parent.frames.location.replace(...&00NT0000000upfz={!Event.ActivityDateTime}...
 
the date in the receiving field shows up as MM/DD/YYYY, so I get "Error: Invalid Date and Time" in the receiving field.
I tried assigning {!Event.ActivityDateTime} to a javascript variable, but the assignment does not produce the Date object. How do I format the sending date/time to be acceptable to the receiving field?
 
I have tried reading through the APEX developer guide and, at this time, most of it is flying high over my head.  I don't have a Java background, so it will take me a bit to ramp up.  I have a need now and am hoping that the development community can help me out.

We are using custom address fields on our Account, Contact and Lead objects so we can have picklists on Country.  We need this design to aid in Lead Assignment rules, Territory Manager rules and Validation Rules to enhance address quality.  One of the downsides of doing this is losing the feature where the Account address automatically copies to the Contact when clicking the New button on the Contact Related List from an Account.

I am wondering if anyone can get me pointed in the right direction (or even write the code for me and post it here :smileyvery-happy:).  I am thinking one of the 2 following solutions would be best:

  1. (preferred) Override the new button on a Contact with an S-Control that calls an Apex code package.  The package should copy the Account address and have it already populated on the contact form when it appears.  This would allow a user to still change the address before saving the contact.
  2. Trigger on the save event of a contact - check to see if the address fields are null.  If so, copy the account address.


  • January 22, 2007
  • Like
  • 0
Hello,
I'm looking for a data dictionnary that give me information about the fields in a table (ex : opportunity) and their description (ex : string, int, date, ...).
How can I do ? with a tool or is this avalaible in SalesForce itself ?

Thank you in advance for any advice ...
  • November 22, 2006
  • Like
  • 0
There are some minor bugs in the "Hello World" example in the "AJAX Getting Started - Part 1 Guide", linked from the AJAX Beta3 page:  http://blog.sforce.com/sforce/2006/04/ajax_toolkit_be.html .  The bugs are minor and don't affect the normal output, but since it's a Hello World app it'll be used as a reference. (I actually found the bug when trying to use this as a reference.)

Here is the meat of the Hello World example at the bottom of Part 1 of the guide.  My changes are in red.  The first part creates a textNode variable but doesn't use it (that line is useless and should be deleted), while the second part creates a variable and wants to use it but doesn't (the text node needs to be added to the document).


                   if (queryResult.size > 0) {
                       
var
output = "";
                       
for
(var i=0;i<queryResult.records.length;i++) {
                           
var
dynaBean = queryResult.records[i];
                           
output += dynaBean.get(
"Id") + " " + dynaBean.get("name") + " [Industry - " + dynaBean.get("Industry") + "]<br>";
                       
}

                        // this line is useless, so take it out
                        //
var
textNode = document.createTextNode(output);
                       
document.getElementById(
"output").innerHTML = output;
                   
} else {

                       
var
textNode = document.createTextNode("No records matched.");
                         // this textNode needs to be added to the document to get displayed:
                        document.getElementById("output").appendChild(textNode);
                    }

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.
 
 
Hello.  I am hoping someone can help me out.  I created an S-Control that changes the ownership of an opportunity, we call it "referring the opportunity".  The problem we are having is in keeping the team members of the opportunity when the ownership is changed via the S-Control.  The team members get deleted when the ownership is changed.  If I could at least add the previous owner as a team member after ownership has changed (which in turn is after the team members get deleted), we could bear with it.  But, I can't even do that because after the ownership of the opportunity changes, and the logic that creates the OpportunityTeamMember record runs, the logged in user doesn't have rights to create the record because they are not the owner of the opportunity anymore. 
 
How can I change the owner of the Opportunity without losing my team members?  If there is no way to prevent losing the team members, how can I at least create one team member record (the person who is the previous owner; who is referring the opportunity to the other person)?
 
Thanks in advance.
 
-E.R.
I'm new at this, so please be patient.

I've been reading other threads about creating a hyperlink, using an image for a button, and I'm having problems implementing this. Here's what I'm trying to do: I have a custom object called Change Management. I'd like to create a button/hyperlink that when clicked adds this record to a shared calendar. When it creates the event on the calendar it needs to use a custom field in Change Management for start date/time and end date/time. Can anyone show me the way?

Thanks much
  • October 16, 2006
  • Like
  • 0
I need to write a formula that will enable me to add the list price items on the product section on the opportunities tab together and total them in a field below the amount field. This is so I can track how much discount our sales team have been giving from our list price to the customer. If this is possible pleae let me know how to perform this function.

Thanks

Andrew
First off, congratulations to everyone at Salesforce.com responsible for the FANTASTIC Dreaforce '06 event you just hosted.  What I learned will be very useful to me and our organization in general.  THANK YOU!
 
My questions are related to the field validation functionality that Eric Bezar covered in one of his sessions.  One of the examples Eric gave concerned checking the Billing State to insure that it was a proper two digit state value.  There are several such examples I want to implement, and I am wondering:

1) Is it possible through standard validation rules (not APEX code) to create a reusable/callable formula?  For example, I would like to check the state/province value on the Lead address fields, Account address fields (billing and shipping), Contract address fields, etc. and would like to call (and maintain) one formula that validates state and province, not one per field that I need to validate.

2) Along the same lines - would it be possible to create "standard" formulas that could be posted and shared throughout the Salesforce community (i.e. "valid USState/CAProvince" formula)?

3) Is it possible, again through validation rules, to validate one field value against another field value - with the possibility of having the secondary field "off screen" (i.e. not visible).  One use case here is that I have created a "Country Picklist" field of all 190+ ISO 3166 countries.  I would like to validate that when someone enters a value in the standard 'Country' field in the address block that the value entered matches one of the values contained in the 'Country Picklist' field.

The above features would be huge productivity savings, and I would really appreciate your thoughts and feedback.

Message Edited by guido59 on 10-13-2006 08:54 AM

Let me first say that this sounds like a great addition to SFDC. My question is where do I begin in testing this new language? I have access to a SFDC preview org. Am I missing something? Do I save it as an s-control? I have read through the documentation but seemed to have missed this starting point.
 
Thanks!
Hi all,
 
Iam using "sales Quote with line Items App". For Quote Amount calculation , Now I have to click on "calculate QuoteAmout " custom link.
 
But what i want is , whenever i have added Quote Lines Itself has to give me Quote Amount without clicking on that custom link.
 
Can any one tell me how to do this?
 
When clicking "save" Button after adding quote lines , I have to invoke that custom link,
 
Is there any way to change the salesforce pages & their links? 
 
I want solution for this as soon as possible.
 
Sudheer Tumu.
Hi
 
I would like to create a custom field under the Opportunity Products object. It should contain the Total Price of the product multiplied with the probability of the opportunity.
I tried to make a field with type formula, and tried to type this: {!Opportunity_Probability}  *  {!TotalPrice}, but I received an error message: Error: Field {!Opportunity_Probability} does not exist. Check spelling.
How can I solve this issue?
Thanks in advance.
  • October 03, 2006
  • Like
  • 0
Does the HYPERLINK formula field function support new parameters to control how the window is opened in the Summer'06 release? Currently this function opens a new window, but it has been requested to add a parameter so the link opens up in the current window... Is this available now or any time frame or when it will be available? thanks
Is it possible to change the logo in our SFDC to our own companies? If so any help on how to do so is certainly appreciated!
 
Cheers,

bhensal
Formula Field's HYPERLINK fuction always launch a popup window. Is it possible not a launch a popup window and instead display html page in the right pane of Salesforce.com UI with the sidebar intact?
 
thanks.   
  • April 18, 2006
  • Like
  • 0
Is there any way to do a redirect, instead of a popup window using a HYPERLINK formula? I'm referencing an Scontrol, so would like it to behave like a Custom Link with an scontrol that uses parent.frames.

Thanks,
Ryan

Message Edited by Grinster650 on 12-08-2005 01:16 PM