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
deeput05deeput05 

sites

HI,

 

 i declared the class as well as the variables as global still i am unable to view my page. 

 

The code,

 

 

VisualForce:

 

<apex:page Controller="newpage1">
<apex:pageBlock >

<apex:pageBlockSection >

<Apex:pageblocktable value="{!leadrec}" var="l">
<apex:column value="{!l.Name}" />
<apex:column value="{!l.Email}" />
</apex:pageblocktable>
</apex:pageBlockSection>

</apex:pageBlock>
</apex:page>

 

apex:

 

global class newpage1 {

global list<lead> leadrec{get;set;}
global newpage1()

{
leadrec=[select Name,Email from lead limit 10 ];

}
}

Gunners_23Gunners_23

Did you enable the Page and Controller for the profile ( might be guest, for public sites)? Check the security settings for the site

 

Site--->Select Site (Click on Label)--->Public Access Settings---> Check for Apex Enabled Classes and Visualforce Page

 

Access

deeput05deeput05

i enabled the settings and still its not working fine

PrakashbPrakashb

Can you specify what is the error you are receiving while viewing your page on the Site??

Gunners_23Gunners_23

Did you checkout the security settings for "Lead" object which is being used in page. Could you share with us the error which

 

you're getting?

deeput05deeput05

no error, but nothing is displayed on the page a blank page is with a pageblock created 

sai.sfsai.sf

Site--->Select Site (Click on Label)--->Public Access Settings---> Field Level Security -->View-->Edit -->make the felds that are visualforce as  visible ....so as show up in site