• kylew@mbs-us.co
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
I just created a flex control and put it in a scontrol. It's a simple control with a data grid and a bar chart. I would say about 50% of the time it shows up black and internet explorer wants me to click to activate the control. once you click on it everything is fine.
 
does anyone know of a way for it to activate automatically?
I've been trying to figure this out for the last two days. I've gone through countless posts and I just don't see my problem. I've created a customobject called residual (residual__c). I've imported some data in to it. I've used the apex data loaded to verify that there is data in it. I then created an scontrol and put it on my accounts page layout but when the scontrol runs all I get is either null or undefined inside of the table cell.
 
Code:
<html> 
<head> 
<script src="/soap/ajax/9.0/connection.js"></script> 
<script>
function createTable() 
{
  var queryContact = sforce.connection.query("SELECT id,report_date__c,residual__c,gross_monthly_volume__c FROM residual__c where name='{!Account.AccountNumber}'");
  var records = queryContact.getArray("records"); 
  htmlstr="<TABLE width=100% class=pbBody border=0>"; 
  htmlstr+="<tr><TH>Report Date</TH><TH>Gross Monthly Volume</TH><TH>Residual</TH></TR>"; 
  for (var i = 0; i < records.length; i++) 
  { 
    htmlstr+="<tr>" +
             "  <td>" + records[i].report_date__c + "</td>" +
             "  <td>" + records[i].gross_monthly_volume__c + "</td>" +
             "  <td>" + records[i].residual_date__c + "</td>" +
             "</tr>";
  }
  htmlstr+="</TABLE>"; 
  document.write(htmlstr);
} 
</script>
</head>
<body onload="createTable();"></body>
</html>

 
I've also used records[i].get("report_date__c"), stored the data in variables, used the alert function, but all seems to give the same result. My data isn't pulling correctly. Can someone see what I'm doing wrong?
 
Thanks
 
Kyle
I've built a custom s-control that links over to a website. This is what it looks like:
 
 
On my control.asp page I grab the aid and create a directory. I ran into a problem because I was creating duplicate directories for different accounts. After further research I found that the {!Account.Id} is missing the last three characters.
 
I've searched the discussion boards and found a few people with my problem but I couldn't find a resolution.
 
Question #1. Is there a unique field I can pass in a scontrol link?
Question #2. What good is Account.Id if it's missing part of the id?
 
Thanks
I've been trying to figure this out for the last two days. I've gone through countless posts and I just don't see my problem. I've created a customobject called residual (residual__c). I've imported some data in to it. I've used the apex data loaded to verify that there is data in it. I then created an scontrol and put it on my accounts page layout but when the scontrol runs all I get is either null or undefined inside of the table cell.
 
Code:
<html> 
<head> 
<script src="/soap/ajax/9.0/connection.js"></script> 
<script>
function createTable() 
{
  var queryContact = sforce.connection.query("SELECT id,report_date__c,residual__c,gross_monthly_volume__c FROM residual__c where name='{!Account.AccountNumber}'");
  var records = queryContact.getArray("records"); 
  htmlstr="<TABLE width=100% class=pbBody border=0>"; 
  htmlstr+="<tr><TH>Report Date</TH><TH>Gross Monthly Volume</TH><TH>Residual</TH></TR>"; 
  for (var i = 0; i < records.length; i++) 
  { 
    htmlstr+="<tr>" +
             "  <td>" + records[i].report_date__c + "</td>" +
             "  <td>" + records[i].gross_monthly_volume__c + "</td>" +
             "  <td>" + records[i].residual_date__c + "</td>" +
             "</tr>";
  }
  htmlstr+="</TABLE>"; 
  document.write(htmlstr);
} 
</script>
</head>
<body onload="createTable();"></body>
</html>

 
I've also used records[i].get("report_date__c"), stored the data in variables, used the alert function, but all seems to give the same result. My data isn't pulling correctly. Can someone see what I'm doing wrong?
 
Thanks
 
Kyle