[SalesForce] Exposing the contract object in the customer portal

I have a customer portal where we expose different types of records to users who need to see only records that belong to the same Account as theirs. The portal is built using Visualforce pages and a Force.com site completely overriding the native portal.

As of now I am achieving this using profiles and sharing settings that come with high volume customer portal user licenses.

I will also need to display CONTRACT (standard object) records to users authorized to see them. When I try to assign security to Contracts, I see its not directly possible. I saw that the Account object security page lists Contracts at the field level. My user's profile has access to this.

Now I am trying to display a link conditionally using the code:

                <apex:variable var="contact_var" rendered="{!$ObjectType.Contract.accessible}" value="Contract">
                    <li><a href="#" id="contractsnav">CONTRACTS</a></li>  

But this link does not appear which means that the user does not have access to CONTRACTS. What am I missing here? Can we display CONTRACT records in a customer portal? And what needs to be done so that portal users can see those records.

Thank you.

Best Answer

Unfortunately Contracts are not accessible through Customer Portal. You can create a second, custom, object and essentially persist duplicate information of the Contract to this custom object. By creating essentially a duplicate object type, you can expose that object type to the customer portal. Here is a blog post regarding it.


Related Topic