We are using angular for front-end and Salesforce is being used for maintaining database. We have a Visualforce Page which is using Static Resource. This Page usually contains the javascript.

We have created Site/Community for Guest Users. These Guest Users have been assigned a Custom Profile. These Users get redirected to the VF Page after login. The flow is working fine.

However when we are trying to 'Preview' the Visualforce Page by clicking 'Preview' button within Salesforce, its giving an error to contact administrator. We have checked the required Permissions of VF Page and they are fine. What else could be the cause?

  • 4
    In your site we get one option "Preview as admin". Click on that and then open the page it will show you error on UI. So that you can easily fix that. – Tushar Sharma Mar 20 '18 at 11:44
  • Thanks for the info. Where can I find 'Preview as Admin'? I checked Sites, but didn't find one. – Salesforce Learner Mar 20 '18 at 11:54
  • You will find in site with the Site URL. – Tushar Sharma Mar 20 '18 at 12:30
  • Still cant find that option. Can you please send a screenshot – Salesforce Learner Mar 21 '18 at 8:18

In the Site/ Community detail page you will find option for Preview as aedmin. Preview your site as Admin and then error will be displayed on UI. So that you can easily fix that.

enter image description here

|improve this answer|||||
  • Thanks for your help. Actually I am not getting this option but getting only 'View' button. Assuming this is the one required. – Salesforce Learner Mar 22 '18 at 10:00
  • @SalesforceLearner Confirm your profile is system admin. Did you set and check the debug log? – Tushar Sharma Mar 22 '18 at 10:31
  • Yes, it is Sys Admin. – Salesforce Learner Mar 22 '18 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.