You need to sign in to do that
Don't have an account?
blakeLL
S-control only showing text if field it refers to also on detail page
I have built a custom s-control that refers to text values stored in a custom text field for accounts. It is apparently only showing info if the custom text field is present. I would like to not have to show the custom text field on the detail page, because the info is redundant. Can someone help?
Here is my HTML s-control that is set to display on the Accounts Detail Page:
<html>
<head>
<head>
{!INCLUDE($SControl.Resize_Iframe_head)}
<style>
body,td {font-size = 12;background-color: #F3F3EC;}
.dataCol {background-color:#F3F3EC; padding:2px 2px 2px 10px; text-align:left; width:32%;}
.data2Col {padding: 2px 2px 2px 10px; text-align: left; width: 82%;}
.col02 {border-right: 20px solid #F3F3EC;}
th.last, td.last {border-bottom:none;}
</style>
<script type="text/javascript">
var dirlist;
dirlist = "{!Account.Report_Directory__c}";
dirlist = dirlist.replace(/ /g, "");
var valueArray = dirlist.split(",");
for(var i=0; i<valueArray.length; i++){
document.write ("<a href='file://spoolers/reportspsx/" + valueArray[i] + "'>" + valueArray[i] + "</a>");
if (i < valueArray.length-1) { document.write (", ");}
}
</script>
</head>
<body onload="{!INCLUDE($SControl.Resize_Iframe_onload)}">
</body>
</html>
body,td {font-size = 12;background-color: #F3F3EC;}
.dataCol {background-color:#F3F3EC; padding:2px 2px 2px 10px; text-align:left; width:32%;}
.data2Col {padding: 2px 2px 2px 10px; text-align: left; width: 82%;}
.col02 {border-right: 20px solid #F3F3EC;}
th.last, td.last {border-bottom:none;}
</style>
<script type="text/javascript">
var dirlist;
dirlist = "{!Account.Report_Directory__c}";
dirlist = dirlist.replace(/ /g, "");
var valueArray = dirlist.split(",");
for(var i=0; i<valueArray.length; i++){
document.write ("<a href='file://spoolers/reportspsx/" + valueArray[i] + "'>" + valueArray[i] + "</a>");
if (i < valueArray.length-1) { document.write (", ");}
}
</script>
</head>
<body onload="{!INCLUDE($SControl.Resize_Iframe_onload)}">
</body>
</html>
Also, if the field is removed from the page layout, how are you going to get values into it? Is it populated with Apex, workflow, another scontrol, etc?