+ Start a Discussion

Dynamic values to display in the sites

Hi All,
I have created a salesforce web site successfully but i am not able to show the values which are in organization object.
In VF page its working fine but the same code in site page is not working......can any one suggest me the best way
to display the object record details on the site.

code goes here

<apex:page showHeader="false" controller="pdftets" >
function fun(a)
var s=new String(a);
// alert(s);
//window.parent.location.href =s;}

<apex:form >
<apex:composition template="{!$Site.Template}">
<apex:define name="body">
<table style="width: 181px">
    <apex:dataTable value="{!accounts}" var="account" id="theTable" width="100%" columns="3">
        <apex:facet name="header">Real Estate News</apex:facet>               
                <apex:column width="60%">


                 <apex:facet name="header">Article</apex:facet>
                    <a href="#" onclick="fun('{!account.Document_URL__c}')" >{!account.name}</a>
                <apex:column width="10%">
                        <apex:facet name="header">Source</apex:facet>
                 <apex:column width="20%" >
                   <apex:facet name="header">Date </apex:facet>
                <apex:outputText value="{!account.CreatedDate}"/>


public with sharing class pdftets {
  List<News_and_Events__c> NewsandEvents1;
        public List<News_and_Events__c> getAccounts() {
       NewsandEvents1= [select name,Source__c,CreatedDate,Document_URL__c from News_and_Events__c limit 10];

                return NewsandEvents1;
 public string Rctype{get;set;}



Have you checked the public access setting of the site? Check whether the fields related to the object are visible in guest user profile.


Hi  pradeep_Navatar ,


Thanks for the reply I checked with the public access setting of the site. Checked whether the fields related to the object are visible in guest user profile, after giving the permetions its not working .


Thanks & warm regards

Adithay k


While your testing, disable the cache on your visualforce pages by putting this after apex:page


cache="false" expires="0"


Also check the field level security for your custom fields.


 Hi ryan,

             I Checked the field level security for custom fields., and i added cache="false" expires="0" but their is no result Please Help As soon as Possible


<apex:page showHeader="false" cache="false" expires="0" Controller="pdftets">



Adithya K




Do you get an error message or is something displayed on the page?


What happens if you use the "Preview as Admin" link on the site detail page and then view the site?


 Hi ryan,

 while right now i am not getting any  errors on page, and when i check  with "Preview as Admin" link from the site lable

it displaying the same static information same as before.









Hi All,

   Any one please help unable to get the dinamic values in the site i checked field level security  and i kept cache="false" expires="0" 


<apex:page showHeader="false" cache="false" expires="0" Controller="pdftets">


But their is no use i am unable to get the values please find the solution as soon as possible



Adithya k