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
brooksbrooks 

visualforce and sites issue . . .

Hi.

I realize that Sites is in developer preview, but I wonder if anyone can help me troubleshoot this problem.

I've created an Account list view in Visualforce with this code, which works great:

Code:
<apex:page standardController="Account" showHeader="true" tabstyle="Account">
<apex:ListViews type="Account" />
</apex:page>

But this same page in Sites has no links. Here's a screenshot:

https://sort.backpackit.com/pub/1634624

I assume this is because I have both Business and Person Account records and Sites can't distinguish the two.

It's a problem that's unique to Accounts as I've done the same with Opportunities and a custom object, and they work fine.

Any ides are appreciated.

 

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent
So, you overriden the view detail page for the opportunity object right?
Setup > App Setup > Customize > Opportunities > Buttons and Links > Override View > Your opportunity Details Visualforce Page

This would override opportunity details page for all profiles, not just for the Public Site. I just wanted to capture the flow

All Answers

brooksbrooks
Here's a little more information about this issue.

In my Sites profile area, I've selected my person account record type (and made it the default).

In the "Page Layouts" section under "Standard Object Layouts" I've attempted to assign my Person Account layout to my Sites profile, but there are only two columns to choose from: Master and Business Accounts. And "Account Layout" is the default layout, which is the Business Account layout. The Person Account layout isn't available.

Any suggestions on how to make Person Accounts active for Sites is appreciated, if anyone has seen this and found a solution.

Again, the issue is that Account list view doesn't provide links to the listed accounts, although it does show them. It also won't show the Person Account view in the drop-down menu that I created. The list view for other standard and custom objects work fine.
BulentBulent
This issue is not related to person accounts and generic issue for accounts, related to the portal integration. In portal, account links are disabled.

The main point is that Sites only allows you to display visualforce pages. When you use standard controllers, actions and the drill down links on your page would take you to the standard salesforce.com pages which you won't be able to expose via your sites. Your options are here to create your own custom list view page by extending the standard controller, so that you can capture the actions and create the correct links.

Message Edited by Bulent on 12-05-2008 06:08 PM
brooksbrooks
Thanks Bulent.

Understand what you're saying, but these are all Visualforce pages.

That is, I created a Visualforce page for Person Accounts records. And I created a VF page for the list view. But the VF list view page still didn't have links.

I don't think there's any reason it wouldn't work.

(Quick note that since I couldn't make this happen, I'm now using a custom object to store my people and it works as you'd expect.)
BulentBulent
if you change your code to make it run for opportunity object and you will see the links on your list view but when you click those links system will take you (by default) to the standard opportunity page which you can not make it public via sites.

So if you build a visualforce page without using the listview tag you can create your own links and drill down to a custom detail visualforce page. also if you extend the standard object you can capture the actions (edit, new etc) and point them to your own visualforce pages. Otherwise these links and actions will take you to the standard pages.
brooksbrooks
Right, I actually did that for the Opportunity object and it worked.

Meaning, I created a Visualforce page for the list view and the detail page. Worked great . . . for the opportunity object.

But not for the Person Accounts object even though I had the exact same kind of Visualforce page for the list view and detail page for it.

Again, the problem was that the list view page for Person Accounts had no links at all. It listed the items in the object, but did not hyperlink them.

Person Accounts is the only object for which I had that problem. I assumed it was something to do with the record type.
BulentBulent
So, you overriden the view detail page for the opportunity object right?
Setup > App Setup > Customize > Opportunities > Buttons and Links > Override View > Your opportunity Details Visualforce Page

This would override opportunity details page for all profiles, not just for the Public Site. I just wanted to capture the flow
This was selected as the best answer
brooksbrooks
Yes, that's right.

>This would override opportunity details page for all profiles, not just for the Public Site.

Yep, which is overkill, I know, but it is the way I've currently done it.