7

I created a very simple web form page in visualforce. Page with few fields and submit button I associated that page with my client website. But when was testing it. it says authorization error.

Authorization Required You must first log in or register before accessing this page. If you have forgotten your password, click Forgot Password to reset it.

And my question is I want that page to open for public who ever access it don't need to login just enter data and hit save that's it. Because they are placing this page url in their website.

Is there any way for this. Please help!. Thanks.

2 Answers 2

6

You need to make sure that the visualforce page which you created has access to Guest user profile. To navigate to Guest user, do as below:

Go to Setup -> Develop -> Sites -> Click Site name -> Public Access Settings enter image description here

In this just make sure you add your Visualforce page under Enabled Visualforce Page Access related list section. Also make sure if you have any object, fields exposed via Visualforce page are accessible by this profile.

1
  • 'Enabled Visualforce Page Access' doesn't exist
    – 2095377
    Commented May 12, 2023 at 8:54
4

Not sure what exactly you want, but hope you are aware of sites. If you want to access your visualforce page without logging in salesforce you can use sites, just set your Visualforce Page the default landing page on site.

Please go through the below link for step by step diagram

Adding Visualforce Page To Sites

1
  • 2
    Thanks a lot for good answer! I would also suggest to add the controller to that VFP after adding to "Enabled Visualforce Page Access" also add to "Enabled Apex Class Access" section.
    – Avichai
    Commented Dec 23, 2021 at 12:00

You must log in to answer this question.

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