0

I have created a simple page with standard controller as Lead and when i previewed it's URL changed from

https://XXX.sandbox.vf.force.com/apex/FirstPage?core.apexpages.request.devconsole=1

to

https://XXX.sandbox.my.salesforce.com/apexpages/devmode/devConsoleViewStateMetadataReceiver.apexp?sfdcIFrameOrigin=https%3A%2F%2FXXX.sandbox.vf.force.com

Here is my VisualForce Page Code:

<apex:page standardController="Lead" sidebar="false">
    <apex:sectionHeader title="signup form" />
    <apex:form >
        <apex:pageBlock title="Create a New formr">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Volunteer Information" columns="1">
                <apex:inputField id="Name" value="{!Lead.Name}" required="true"/>
                <apex:inputField id="Status" value="{!Lead.Status}"/>                 
                <apex:inputField id="Company" value="{!Lead.Company}" required="true"/> 
                <apex:inputField id="Phone" value="{!Lead.Phone}" required="true"/>
                <apex:inputField id="Email" value="{!Lead.Email}" required="true"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

In last can anyone please let me know how can i make it public as anybody can access it and login will not be required anymore?

2
  • Did you try creating a site and adding this page there Dec 5, 2022 at 7:31
  • No. I just opened the developer page and create a new visualforce page. that's it Dec 5, 2022 at 7:44

1 Answer 1

0

You have to create a Force.com site and add your visualforce page to list of Enabled Visualforce Pages. To create force.com site you have to go to

setup-> Sites-> create new site

You can set some visualforce page as Active Site Home Page. You can set the same page as well and a profile will be created for the same .

You have to give read and create access for lead object for the newly created profile.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .