8

I know that the development mode footer has an option to show the view state which I've used before when developing internal Salesforce pages; however, I don't see how that can be used on a force.com site page.

How do I get information about the view state when working with a Force.com site page? Ideally, the solution would work for force.com site authenticated (via customer portal auth) pages as well.

Thanks.

4
  • Is there a reason why you can't just access it using /apex/[Custom Page]? They are all Visualforce pages. Oct 15, 2012 at 21:46
  • Yes. I don't see which user I would be able to turn the development mode footer on for. Oct 15, 2012 at 21:48
  • That did work for the public page. There are some other pages that require authentication and only display correctly based on certain attributes that are specific to the application. So I think that solution works for the public pages, but not my authenticated pages. I also do some url rewriting and the pages aren't actually accessible, but rather a template that includes them dynamically is the only page available. I had to add them to the profile/site list of pages. Thanks! Oct 15, 2012 at 21:54
  • Thanks Daniel. It seems obvious now. ;) I was thinking just about accessing the page through the site URL of mysite.csX.force.com/mySite/mySitePage and not through the SFinstance/apex/myPageName URL. Oct 15, 2012 at 22:09

2 Answers 2

7

For pages that don't require customer portal authentication, you can access them through https://[instance].salesforce.com/apex/[page name]. This gives you the entire development mode footer.

I don't have a solution for pages that may require authentication with a specific user.

1
  • @peterKnolle Just ran across this; I ended up testing for UserInfo.getUserType() == 'Standard' as a backdoor way to avoid authentication where otherwise the user would be Guest. Thus, view state is avail per normal \apex\pagename. That said, we aren't using customer portal and instead have a home grown SSO-controlled authentication regime for intranet users access to Sites pages
    – cropredy
    Apr 26, 2016 at 22:15
3

Go to Setup -> User Profile -> Select 'Show View State in Development Mode'. At the bottom of your Visualforce page you will see 3 tabs -> Visualforce page, Apex Class and View State. Click on View State to get more information on the state of your Visualforce page.

You must log in to answer this question.

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