• gmc74
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 25
    Replies
I have a simple S-Control that shows some HTML on a screen.  I want to add an if statement to this where if the value returned is 'In Office' (with out quotes of course) then run as it is, if it is anything else, then I want to change the color of the font. I know the HTML, but I can't get the if statement to work.  Any ideas?

Code:
<html>
<head>
<script src="/soap/ajax/10.0/connection.js"></script>
<script src="/js/dojo/0.4.1/dojo.js"></script>

<script>
  dojo.addOnLoad(init);


function init() {
  var callback = {
    onSuccess : displayResult,
    onFailure : displayError
  };
sforce.connection.query("SELECT Support_In_Out__c FROM User where ID  = '{!Case.Route_To_UserId__c}'", callback);
}



function displayResult(result) {
  var it = new sforce.QueryResultIterator(result);
  var html = [];
  while(it.hasNext()) {
    var record = it.next();
    html.push("<td> This Account Manager is listed as <b>" + record.Support_In_Out__c + "</b></td>");
    html.push("</tr>");
    
  }

  document.getElementById("output-div").innerHTML = html.join("");
}

function displayError(error) {
  document.getElementById("output-div").innerHTML =
    "oops something went wrong ... " + error;
}
</script>


</head>
<body>

  <div id="output-div"></div>


</body>
</html>

 

  • June 02, 2008
  • Like
  • 0
Hi Everyone,

I have a button on a custom object that is used to track Bugs.  When the button is clicked, it should re-open a closed bug, but I don't want people to be able to click it on a bug that isn't closed.

Any thoughts?

Here is the S-Control as it stands now -


Code:
<html>
<head>
<title></title>
<script>

var newURL2 = 'https://na2.salesforce.com/{!SFDC_Bug__c.Id}/a—retURL=%2F{!SFDC_Bug__c.Id}&newOwn_lkid={!$User.Id}&save=1';
window.location.href = (newURL2);


var newURL =
'https://na2.salesforce.com/{!SFDC_Bug__c.Id}/e–retURL=%2F{!SFDC_Bug__c.Id}&CF00N40000001M1ey=&00N40000001Uh3v=--None--&CF00N40000001M1Zh=&00N40000001M1wP=&00N40000001Uh3h=&save=0';
window.parent.location.replace(newURL);


</script>
</head>

The first URL changes the ownership to the person who clicked the button, and the second one blanks out a number of fields that I want them to fill back in.

I tried to add an if statement that basically states, if the status = closed (using the IsPickVal command) then open the URL, if not, then open a different URL.  but I am getting tons of errors saying I am missing )

Here is that code

Code:
<html>
<head>
<title></title>
<script>

var newURL2 = 'https://na2.salesforce.com/{!SFDC_Bug__c.Id}/a—retURL=%2F{!SFDC_Bug__c.Id}&newOwn_lkid={!$User.Id}&save=1';

var newURL =
'https://na2.salesforce.com/{!SFDC_Bug__c.Id}/e–retURL=%2F{!SFDC_Bug__c.Id}&CF00N40000001M1ey=&00N40000001Uh3v=--None--&CF00N40000001M1Zh=&00N40000001M1wP=&00N40000001Uh3h=&save=0';

{!IF(  ISPICKVAL(SFDC_Bug__c.SFDC_Status__c, 'Closed - 2nd Level') ,window.parent.location.replace(newURL); , 'https://na2.salesforce.com/{!SFDC_Bug__c.Id})}


</script>
</head>

 Any ideas?

Ideally I would like the button to not display at all if the criteria aren't met, but if that isn't possible, then the next best thing is to have it perform a separate function.

Thanks

Grant

 

  • March 20, 2008
  • Like
  • 0
Hi everyone,

I have a select statement that tells me the number of open cases

Code:
select count() from case where isclosed = false

I want to add this to an S-Control so I can put that information on certain pages, the problem is that I don't know how to get to the number that should be returned.

Any ideas?

Thanks

Grant

  • February 05, 2008
  • Like
  • 0
Hi everyone,

I currently have a button on a case that will change a handful of fields so that the user can "Take" the case.  I have a separate button that the user can run which will change their status to "In Office" (a custom field on the user record).  I would like to do both of these when they click a single button, any suggestions?

Currently I am using URLs

1)https://na2.salesforce.com/{!Case.Id}/e?retURL=%2F{!Case.Id}&cas7=Taken&CF00N40000001VTQJ_lkid={!User.Id}&save=1
2)https://na2.salesforce.com/{! User.Id}/e?retURL=%2F{!User.Id}&00N40000001VsGs="In%20Office"&save=1

Any suggestions would be appreciated.

Thanks

Grant
  • February 01, 2008
  • Like
  • 0
Is it possible for an S-Control to auto-update like an AJAX web page?  Or at the very least, auto refresh every X seconds?

If yes, can someone point me towards some sample code?

Thanks
  • January 22, 2008
  • Like
  • 0
Hi Everyone,
 
I created an S-Control with the AJAX Tools 1.4
 
Code:
<html>
<!--
Generated by AJAX tools
Date : Thu Jan 17 2008 15:58:00 GMT-0700 (US Mountain Standard Time)
Template : listview.html by manoj@cheenath.com
SControl : CaseTestSControl
-->

<html>

<head><title>listview</title>

<link rel="shortcut icon" href="/favicon.ico"/>
<script src="/soap/ajax/8.0/connection.js"></script>
<script src="/js/dojo/0.3.1/dojo.js"></script>
<title>CaseTestSControl</title>

<style>
table {
font-family: Lucida Grande, Verdana;
font-size: 0.8em;
width: 100%;
border: 1px solid #ccc;
cursor: default;
}

* html div.tableContainer {
/* IE only hack */
width: 95%;
border: 1px solid #ccc;
height: 285px;
overflow-x: hidden;
overflow-y: auto;
}

table td,
table th {
border-right: 1px solid #999;
padding: 2px;
font-weight: normal;
}

table thead td, table thead th {
background: #94BEFF;
}

* html div.tableContainer table thead tr td,
* html div.tableContainer table thead tr th {
/* IE Only hacks */
position: relative;
top: expression( dojo.html.getFirstAncestorByTag(this, 'table').parentNode.scrollTop-2);
}

html>body tbody.scrollContent {
height: 262px;
overflow-x: hidden;
overflow-y: auto;
}

tbody.scrollContent td, tbody.scrollContent tr td {
background: #FFF;
padding: 2px;
}

tbody.scrollContent tr.alternateRow td {
background: #e3edfa;
padding: 2px;
}

tbody.scrollContent tr.selected td {
background: yellow;
padding: 2px;
}

tbody.scrollContent tr:hover td {
background: #a6c2e7;
padding: 2px;
}

tbody.scrollContent tr.selected:hover td {
background: #ff3;
padding: 2px;
}
</style>

<script type="text/javascript">
dojo.require("dojo.widget.SortableTable");
dojo.addOnLoad(displayTable);


function displayTable() {
var query = "Select " +
"Id,CaseNumber,Status,Remaining__c,Route_To_User__c,Route_To_Group__c" +
" from Case where Status = 'New' ORDER BY Remaining__c";

var result = sforce.connection.query(query);

var sb = new sforce.StringBuffer();
sb.append("<tr>");
sb.append("<td>No</td>");

sb.append("<td>Id</td>");

sb.append("<td>CaseNumber</td>");

sb.append("<td>Status</td>");

sb.append("<td>Remaining__c</td>");

sb.append("<td>Route_To_User__c</td>");

sb.append("<td>Route_To_Group__c</td>");

sb.append("</tr>");

while (true) {
if (result.size > 0) {
for (i = 0; i < result.records.length; i++) {
var record = result.records[i];
sb.append("<tr><td>").append(i).append("</td>");

sb.append("</td><td> ").append(editLink(record, "Id"));

sb.append("</td><td> ").append(editLink(record, "CaseNumber"));

sb.append("</td><td> ").append(editLink(record, "Status"));

sb.append("</td><td> ").append(editLink(record, "Remaining__c"));

sb.append("</td><td> ").append(editLink(record, "Route_To_User__c"));

sb.append("</td><td> ").append(editLink(record, "Route_To_Group__c"));

sb.append("</td></tr>");
}
}
if (result.done == "true") {
break;
} else {
result = sforce.connection.queryMore(result.queryLocator);
}
}
document.getElementById("list-view-table").innerHTML = sb.toString();
}


function editLink(record, field) {
var value = record[field];
value = value — value : "&nbsp;";
return value;

//todo: edit link
return "<a href='javascript: editCell(\"" + record.Id +
"\",\"" + field + "\",\"" + value + "\")'>" +
value + "</a>";
}


function editCell(id, field, value) {
var newVal = prompt("Enter new text", value);
if (newVal === null || newVal === value) {
alert("Field not changed");
return;
} else {
value = newVal;
}
var record = new sforce.SObject("Account");
record.Id = id;
record[field] = value;

try {
result = sforce.connection.update([record]);
if (result[0].getBoolean("success") == false) {
alert("update failed");
} else {
//initPage();
}
} catch (e) {
alert("update failed");
//sforce.debug.display(e);
}
}
</script>
</head>

<body>
<div class="tableContainer">

<table dojoType="SortableTable" id="list-view-table"
headClass="fixedHeader" tbodyClass="scrollContent"
enableMultipleSelect="true" enableAlternateRows="true"
rowAlternateClass="alternateRow" cellpadding="0" cellspacing="0" border="0">
</table>
</div>

</body>
</html>

 
The S-Control does what I want it to, but it won't display in Internet Explorer, only in Firefox.  If it were up to me, that would be fine, unfortunately my company is a Microsoft Partner so it won't fly.
 
Any ideas?  The error is an unknown run time error and the URL is that of the S-COntrol
 
Thanks
 
Grant
  • January 18, 2008
  • Like
  • 0
Hi Everyone,

I have a button that creates new cases by taking information from the Account and Contact tabs and autopopulating the case fields when the button is selected.  I would like to set the owner of the case to someone other than the person that is actually creating the case, but I can't come up with a way to do this.

Any ideas?

My current button does this -

https://na1.salesforce.com/500/e?retURL=%2Fhome%2Fhome.jsp&cas3={!Contact.Name}&cas4={!Account.Name}&00N40000001VPFb={!Account.Account_Support_Status__c}&00N40000001VPFW={!Account.Support_Region__c}&CF00N40000001VTQJ={!Account.Support_Rep__c}&00N40000001VUGy={!Contact.Phone}&00N40000001VUGt={!Contact.Email}&CF00N40000001VXu2={!Account.Stromberg_Version2__c}&00N40000001VfmF={!Account.Credit_Hold__c}&00N40000001VfmK={!Account.Credit_Hold_Detail__c}&00N40000001VUGZ=1&00N40000001Vfyl={!Account.Support_Hold__c}&00N40000001Vklc={!Account.Support_Notes__c}&00N40000001Vklh={!Account.Connection_Information__c}

But there is no form field for Owner, so I don't know if I can add that information in there.

Any help would be greatly appreciated,

Thanks,

Grant
  • January 14, 2008
  • Like
  • 0
I am a pretty novice developer, mostly hack together code to do what I need.  I am writing an asp page in c# that gathers a list of current cases and I am running into an issue.

I grab a number of case fields, including one that is a lookup to a user (called RouteTo).  If I grab this field, it of course returns the user id, not the person's name.  If I grab RouteTo__r.Name instead of the RouteTo__c then it will return the value but it is nested, and I am not sure how to get to that in my code. 

Is there a simple way to get the query to grab the name instead of the id?

Thanks for your help

Grant
  • January 01, 2008
  • Like
  • 0
I am working on something where I need to be able to populate the values on a picklist with Salesforce Users who are in either a specific role (or roles) or a profile (or profiles), either one will work.

Has anyone done this?  Can you point me in the right direction?

Thanks

Grant
  • November 01, 2007
  • Like
  • 0
    Hi Everyone,

I have written a simple S-Control to gather a number of different items from the Account when a case is created.  I want that data to be available to the person entering the case before they save it, but I can't seem to get the data to be available on the 'New' case screen, just when you edit an existing case.

I attached the same S-Control to a button and placed it on the screen, but it too is only available when the screen is in 'Edit' mode, not when it is first created (prior to being saved).

Any ideas?

Thanks,

Grant
  • October 22, 2007
  • Like
  • 0
I have a simple S-Control that shows some HTML on a screen.  I want to add an if statement to this where if the value returned is 'In Office' (with out quotes of course) then run as it is, if it is anything else, then I want to change the color of the font. I know the HTML, but I can't get the if statement to work.  Any ideas?

Code:
<html>
<head>
<script src="/soap/ajax/10.0/connection.js"></script>
<script src="/js/dojo/0.4.1/dojo.js"></script>

<script>
  dojo.addOnLoad(init);


function init() {
  var callback = {
    onSuccess : displayResult,
    onFailure : displayError
  };
sforce.connection.query("SELECT Support_In_Out__c FROM User where ID  = '{!Case.Route_To_UserId__c}'", callback);
}



function displayResult(result) {
  var it = new sforce.QueryResultIterator(result);
  var html = [];
  while(it.hasNext()) {
    var record = it.next();
    html.push("<td> This Account Manager is listed as <b>" + record.Support_In_Out__c + "</b></td>");
    html.push("</tr>");
    
  }

  document.getElementById("output-div").innerHTML = html.join("");
}

function displayError(error) {
  document.getElementById("output-div").innerHTML =
    "oops something went wrong ... " + error;
}
</script>


</head>
<body>

  <div id="output-div"></div>


</body>
</html>

 

  • June 02, 2008
  • Like
  • 0
Hi Everyone,

I have a button on a custom object that is used to track Bugs.  When the button is clicked, it should re-open a closed bug, but I don't want people to be able to click it on a bug that isn't closed.

Any thoughts?

Here is the S-Control as it stands now -


Code:
<html>
<head>
<title></title>
<script>

var newURL2 = 'https://na2.salesforce.com/{!SFDC_Bug__c.Id}/a—retURL=%2F{!SFDC_Bug__c.Id}&newOwn_lkid={!$User.Id}&save=1';
window.location.href = (newURL2);


var newURL =
'https://na2.salesforce.com/{!SFDC_Bug__c.Id}/e–retURL=%2F{!SFDC_Bug__c.Id}&CF00N40000001M1ey=&00N40000001Uh3v=--None--&CF00N40000001M1Zh=&00N40000001M1wP=&00N40000001Uh3h=&save=0';
window.parent.location.replace(newURL);


</script>
</head>

The first URL changes the ownership to the person who clicked the button, and the second one blanks out a number of fields that I want them to fill back in.

I tried to add an if statement that basically states, if the status = closed (using the IsPickVal command) then open the URL, if not, then open a different URL.  but I am getting tons of errors saying I am missing )

Here is that code

Code:
<html>
<head>
<title></title>
<script>

var newURL2 = 'https://na2.salesforce.com/{!SFDC_Bug__c.Id}/a—retURL=%2F{!SFDC_Bug__c.Id}&newOwn_lkid={!$User.Id}&save=1';

var newURL =
'https://na2.salesforce.com/{!SFDC_Bug__c.Id}/e–retURL=%2F{!SFDC_Bug__c.Id}&CF00N40000001M1ey=&00N40000001Uh3v=--None--&CF00N40000001M1Zh=&00N40000001M1wP=&00N40000001Uh3h=&save=0';

{!IF(  ISPICKVAL(SFDC_Bug__c.SFDC_Status__c, 'Closed - 2nd Level') ,window.parent.location.replace(newURL); , 'https://na2.salesforce.com/{!SFDC_Bug__c.Id})}


</script>
</head>

 Any ideas?

Ideally I would like the button to not display at all if the criteria aren't met, but if that isn't possible, then the next best thing is to have it perform a separate function.

Thanks

Grant

 

  • March 20, 2008
  • Like
  • 0
Hi,
 
   I am new to salesforce and pretty new to s-control.I want to populate some custom fields based on the values that are present in the Contacts.The code that I have written is as below:
 
<html>
<head>
<title></title>
<script>
var newurl="{!URLFOR($Action.Case.NewCase,null,
                                         [ eid= Contact.Id,
                                          cas15= Contact.Description,
                                           cas4= Account.Name,
                                           cas3= Contact.Name, 
                                          00N700000022TqG=Contact.User_Name__c,
                                           retURL=$Request.retURL ],true)}";
                                           window.parent.location.replace(newurl);
</script>
</head>
 
I am getting an error on the line after cas3 since that is the id of the custom field.Could somebody help me out on this and tell me how to solve the problem.Or is there any other way this can be accomplished.
 
Thanks,
 
Bharathi
 
Hi,
 
I am tried to set the selected datetime value in a reminderdatetime field of task object in the following format.
  1. Complete date plus hours and minutes:
      YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
  2. Complete date plus hours, minutes and seconds:
      YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
  3. Complete date plus hours, minutes, seconds and a decimal fraction of a
     second
      YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
but it gives me error when i try to use above format.
--------------------------------------------------------------------------------------------------- 
Exception :
{faultcode:'soapenv:Client', faultstring:''2007-12-25T00:00:00+05.5:30' is not a valid value for the type xsd:dateTime', }
---------------------------------------------------------------------------------------------------
I am trying to set the value in this datetime field by using following code 
+++++++++++++++++++++++++++++
var strReminderDate = document.getElementById("ReminderDateTime").value;//strReminderDate = yyyy/mm/dd
var strTime = document.getElementById("cboReminderDateTime").value //strTime = 00:00(hh:mm)
var remdateArr = new Array();
remdateArr = strReminderDate.split("/");
var remnewDate = remdateArr[2]+"/"+remdateArr[0]+"/"+remdateArr[1]+" "+strTime+"Z";
task.ReminderDateTime = new Date(remnewDate);
+++++++++++++++++++++++++++++
So how do I assign the selected date & time in the ReminderDateTime field 
of Activity Object through javaScript.
Thanks & Regards
Rameshwar
I am creating case from account using s-control. I can create the case but I don't know to check 'Assign using active assignment rules' and
'Send notification email to contact' checkbox true using s-control.

Please suggest

Thanks

I am new to s-controls and need to build an s-control to copy the Billing Address to the Shipping Address on the Account object.   Please advise.
 
thx
Jeanette
 
Hi,

I have already searched the forums for an answer to my question, but I couldn't find any.

Say I have added a custom link on the Accounts tab, called 'Transfer'. I have also added a new checkbox in the 'account information' group, called 'Was transferred'. Whenever my user clicks on 'Transfer' while viewing an account (not editing it), I would also like the checkbox to get checked automatically. Is this feasible ?

Thank you,
Andrei


Message Edited by A. Tanasescu on 01-18-2008 09:29 AM
Hi Everyone,
 
I created an S-Control with the AJAX Tools 1.4
 
Code:
<html>
<!--
Generated by AJAX tools
Date : Thu Jan 17 2008 15:58:00 GMT-0700 (US Mountain Standard Time)
Template : listview.html by manoj@cheenath.com
SControl : CaseTestSControl
-->

<html>

<head><title>listview</title>

<link rel="shortcut icon" href="/favicon.ico"/>
<script src="/soap/ajax/8.0/connection.js"></script>
<script src="/js/dojo/0.3.1/dojo.js"></script>
<title>CaseTestSControl</title>

<style>
table {
font-family: Lucida Grande, Verdana;
font-size: 0.8em;
width: 100%;
border: 1px solid #ccc;
cursor: default;
}

* html div.tableContainer {
/* IE only hack */
width: 95%;
border: 1px solid #ccc;
height: 285px;
overflow-x: hidden;
overflow-y: auto;
}

table td,
table th {
border-right: 1px solid #999;
padding: 2px;
font-weight: normal;
}

table thead td, table thead th {
background: #94BEFF;
}

* html div.tableContainer table thead tr td,
* html div.tableContainer table thead tr th {
/* IE Only hacks */
position: relative;
top: expression( dojo.html.getFirstAncestorByTag(this, 'table').parentNode.scrollTop-2);
}

html>body tbody.scrollContent {
height: 262px;
overflow-x: hidden;
overflow-y: auto;
}

tbody.scrollContent td, tbody.scrollContent tr td {
background: #FFF;
padding: 2px;
}

tbody.scrollContent tr.alternateRow td {
background: #e3edfa;
padding: 2px;
}

tbody.scrollContent tr.selected td {
background: yellow;
padding: 2px;
}

tbody.scrollContent tr:hover td {
background: #a6c2e7;
padding: 2px;
}

tbody.scrollContent tr.selected:hover td {
background: #ff3;
padding: 2px;
}
</style>

<script type="text/javascript">
dojo.require("dojo.widget.SortableTable");
dojo.addOnLoad(displayTable);


function displayTable() {
var query = "Select " +
"Id,CaseNumber,Status,Remaining__c,Route_To_User__c,Route_To_Group__c" +
" from Case where Status = 'New' ORDER BY Remaining__c";

var result = sforce.connection.query(query);

var sb = new sforce.StringBuffer();
sb.append("<tr>");
sb.append("<td>No</td>");

sb.append("<td>Id</td>");

sb.append("<td>CaseNumber</td>");

sb.append("<td>Status</td>");

sb.append("<td>Remaining__c</td>");

sb.append("<td>Route_To_User__c</td>");

sb.append("<td>Route_To_Group__c</td>");

sb.append("</tr>");

while (true) {
if (result.size > 0) {
for (i = 0; i < result.records.length; i++) {
var record = result.records[i];
sb.append("<tr><td>").append(i).append("</td>");

sb.append("</td><td> ").append(editLink(record, "Id"));

sb.append("</td><td> ").append(editLink(record, "CaseNumber"));

sb.append("</td><td> ").append(editLink(record, "Status"));

sb.append("</td><td> ").append(editLink(record, "Remaining__c"));

sb.append("</td><td> ").append(editLink(record, "Route_To_User__c"));

sb.append("</td><td> ").append(editLink(record, "Route_To_Group__c"));

sb.append("</td></tr>");
}
}
if (result.done == "true") {
break;
} else {
result = sforce.connection.queryMore(result.queryLocator);
}
}
document.getElementById("list-view-table").innerHTML = sb.toString();
}


function editLink(record, field) {
var value = record[field];
value = value — value : "&nbsp;";
return value;

//todo: edit link
return "<a href='javascript: editCell(\"" + record.Id +
"\",\"" + field + "\",\"" + value + "\")'>" +
value + "</a>";
}


function editCell(id, field, value) {
var newVal = prompt("Enter new text", value);
if (newVal === null || newVal === value) {
alert("Field not changed");
return;
} else {
value = newVal;
}
var record = new sforce.SObject("Account");
record.Id = id;
record[field] = value;

try {
result = sforce.connection.update([record]);
if (result[0].getBoolean("success") == false) {
alert("update failed");
} else {
//initPage();
}
} catch (e) {
alert("update failed");
//sforce.debug.display(e);
}
}
</script>
</head>

<body>
<div class="tableContainer">

<table dojoType="SortableTable" id="list-view-table"
headClass="fixedHeader" tbodyClass="scrollContent"
enableMultipleSelect="true" enableAlternateRows="true"
rowAlternateClass="alternateRow" cellpadding="0" cellspacing="0" border="0">
</table>
</div>

</body>
</html>

 
The S-Control does what I want it to, but it won't display in Internet Explorer, only in Firefox.  If it were up to me, that would be fine, unfortunately my company is a Microsoft Partner so it won't fly.
 
Any ideas?  The error is an unknown run time error and the URL is that of the S-COntrol
 
Thanks
 
Grant
  • January 18, 2008
  • Like
  • 0
Hi All
 
I have written a S-control to update a field.
 
The Problem is 'it is not working for few profiles'. What might be the reason.
 
Can anyone help in this.
 
Thanks in Advance
Anand
I have the following S-Control code:
Code:
<html> 
<head> 
<meta http-equiv=“refresh” content=“600″ /> 
<script type="text/javascript" src="/soap/ajax/10.0/connection.js"></script> 
<script type="text/javascript"> 
window.onload=init_page; 
function init_page() 
{ 
var j= ""; 
var output=""; 
strSQL = "Select Id,AS400_Account_Number__c,Name,BillingCity,SF_DATE_ON_SERVICE__c from Account where OwnerId='{!$User.Id}' and SF_DATE_ON_SERVICE__c = LAST_N_DAYS:30 ORDER BY SF_DATE_ON_SERVICE__c"; 
var result = sforce.connection.query(strSQL); 
var records = result.getArray("records"); 
for (var i=0; i<records.length; i++) 
{ 
j +='<a href="/' + records[i].Id + ' "target=_blank"">' + (i+1) +') ' + records[i].AS400_Account_Number__c + ' - ' + records[i].Name + ' - ' + records[i].BillingCity + ' - ' + records[i].SF_DATE_ON_SERVICE__c + '</a><br>&nbsp;' 
} 
document.getElementById('div_tag').innerHTML = j ; 
} 
</script> 
</head> 
<body bgcolor="#EEEEEE"> 
<font size="2" face="Garamond"> 
<div id="div_tag">Loading...</div></font> 
</body> 
</html>

 How do I display this on the Homepage... This is a Custom S Control....
Could someone give me some best practises + samples on how to deal with date fields in S-Controls?
  • How to select a date value using SOQL
  • How to parse a date retrieved by merge fields i.e. ({!Opportunity.CloseDate}
  • How to re-use a selected date from either SOQL or mergefield in a new query
  • What javascript files to include?
  • September 11, 2007
  • Like
  • 0
Ok. So let's say I've built a custom object related the the Contracts object. So in the detail page for the Custom Object, I've got the Contract Number field, which displays the contract to which the object is related. This is nice, however, we really don't remember contracts by this number, but rather by the Contract Name.

Is there a way to use a custom S Control to bring the Contract Name into the custom object's detail page?

I'm not sure i even know where to start.