6

In my customer community I am using a web tab to display a VisualForce page that is a custom list view. I am using a web tab instead of a VisualForce tab because I am also passing through a parameter on the URL.

I have added the Visualforce page to the Community User profile and added it to the Community. The tab functions fine within Salesforce. In the Community, though, when the tab is clicked, I receive a site under construction page and the url no longer has the community name in it. If I add back in the Community name, it displays fine.

For example, say community address is:
www.domain.force.com/communityname

the web tab url is

/apex/VisualForcePage?viewid=00BE0000004UYvl

so the url of the tab within the Community should be:

www.domain.force.com/communityname/apex/VisualForcePage?viewid=00BE0000004UYvl

But instead, when the tab is clicked, I get:

www.domain.force.com/apex/VisualForcePage?viewid=00BE0000004UYvl

Any ideas? The ultimate goal is to show a custom list view in the Community. Any other workaround suggestions are welcome!

7

You don't need /apex/ when you want to expose the page in the community.

First, make sure your page is available for the community (Setup -> Develop -> Sites -> Your Community -> Site Visualforce pages) as well as for the user profile.

Then your URL should look something like this:

`{!URLFOR($Site.BaseCustomUrl+'/'+SUBSTITUTE($Site.Prefix, '/', '')+'/VisualForcePage?viewid='+OBJECT__c.Id)}

You need to replace the first forward slash, SF is doing weird things by adding extra ones when you build relative URL paths...

  • This works, but now the header shows twice and I can't set showheader=false in the VisualForce page. I receive the error "Error: <apex:enhancedList> component cannot be included when <apex:page> 'showHeader' attribute is false." Any other ideas on how I might be able to fix the double header issue? – Lara Hoke Dec 9 '14 at 2:34
  • I think that's another issue, so it'd be great if you close this and post another question for that. – Boris Bachovski Dec 9 '14 at 2:36

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.