3

I've created a custom object called Beer. I've also created a VF page and Apex controller to simply display the beers via the customer portal site using a high volume customer portal user license.

VF Page

<apex:page controller="BeerController">

 <apex:pageBlock title="Good List">
    <apex:dataTable value="{!myListGood}" var="item" cellPadding="4" border="1">
      <apex:column >id=[{!item.id}]</apex:column>
    </apex:dataTable>
  </apex:pageBlock>

 <apex:pageBlock title="Bad List">
    <apex:dataTable value="{!myListBad}" var="item" cellPadding="4" border="1">
      <apex:column >id=[{!item.id}]</apex:column>
    </apex:dataTable>
  </apex:pageBlock>

</apex:page>

Controller

public class BeerController {
    public List<Account> getMyListGood() { return [select id from Account]; }
    public List<Beer__c> getMyListBad() { return [select id from Beer__c]; }
}

I've enabled BeerPage for the High Volume Customer Portal Profile.

I created three accounts and two beers and when I look at the page, I see the following:

Good List
id=[001i000000FGjldAAD]
id=[001i000000IlhtxAAB]
id=[001i000000IlhtyAAB]

Bad List
id=[]
id=[]

So it looks like the controller can successfully retrieve both Account and Beer lists but my user cannot see the attributes of the custom Beer object. What am I missing?

Thanks in advance!!

1 Answer 1

2

I suspect its read permission on the custom object for customer portal profile and make sure object is available for customer portal

NOTE:If you are using HVCP profile the you will have to clone the profile and then you can give access to custom objects

4
  • Ah - thanks. I forgot to mention that I did check the "Available for Customer Portal" checkbox on the Beer object. As far as granting read permission on the Beer custom object, I look at the HVCP profile and see nothing is checked for Beers in the Custom Object Permissions section. But I don't see any way to check the Read/Create/Edit/Delete boxes.
    – Bart
    Commented Jul 25, 2013 at 18:57
  • ok so you will have to clone the standard HVCP profile to do this .Also if this answers please mark answer as true . Commented Jul 25, 2013 at 19:16
  • Yep, that was it! Didn't realize we couldn't just use the standard HVCP profile. Once I cloned it, I could check the boxes. Thanks!!
    – Bart
    Commented Jul 25, 2013 at 19:19
  • Write !Upvote and glad it resolved your issue.thanks Commented Jul 25, 2013 at 19:19

You must log in to answer this question.

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