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
Luke Higgins 23Luke Higgins 23 

Allow visualforce page to be visible to public and update records

I have a Timesheet object and once the Timesheet status field is changed to "Submitted", it kicks off an automated workflow that sends an email to the Contact associated with the Timesheet record (Timesheet Approver). The Classic Email Template (HTML) I created, grabs the Timesheet record ID from the workflow and appends it to a Site URL that is sent in the email body. Once this link is clicked, it's supposed to take you to the Visualforce page enabled on the site and the Apex class associated with the VF page switches the Timesheet status to "Approved" when the link is clicked. Currently, once selecting the link, the URL requires a sign-in to make the update. The main goal is to be able to send an email to external contacts where they can quickly approve timesheets from clicking a link in an email and not have to login anywhere. It all works perfectly if you are signed in, but that is the main thing I'm trying to avoid. If you could help me correctly set up this Site/VF page to be visible and functional for public use, or even an entirely different way to do this, that would be greatly appreciated!
ShirishaShirisha (Salesforce Developers) 
Hi Luke,

Greetings!

You need to add the VF page access to the Gues user Profile on the site to make it visible for guest users.

Reference:https://help.salesforce.com/articleView?id=users_profiles_visualforce_access.htm&type=5

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Luke Higgins 23Luke Higgins 23
It is already added to the "Enabled Visualforce Page Access" and the Apex class is added to the "Enabled Apex Class Access" yet it still requires a login. I am doing this in my sandbox, does that have anything to do with the issue?
Luke Higgins 23Luke Higgins 23
I figured it out! The Field-Level Security for the object I was editing didn't allow for read/edit permissions on the fields I was using.