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
blakeLLblakeLL 

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>
{!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>
jpizzalajpizzala
Are you working in a production environment that is not Enterprise or Unlimited? If so, you may be running into a field-level security issue. I believe that when you take the field out of the page layout in, say Professional Edition, the field is no longer accessible.

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?
blakeLLblakeLL
Well the text in the field is a list of folder names... My script turns these folder names into links on our network.
 
The value of the fields comes from an export from our system, so the end user will not need write access.
 
I am using professional edition, so am I out of luck? Any work arounds?
sfdcfoxsfdcfox
Yes, removing a field on the page layout in Professional Edition also sets it's Field Level Security to Hidden for all profiles (so you can't view the data in a report or view when it is not otherwise visible). You'll need to have it on the page in order for the S-Control to see it.