+ Start a Discussion

Visualforce in Partner Portal

I am trying to create a custom VF page for both a regular Platform user (i.e. the company) and a Portal User (i.e. their client/partner) on the same custom object so they can each have a special view.


Do I really need to create two VF pages (even though they are identical) and then somehow display the right one based on the users' profile? I was hoping I could create one, override the "View" of the object and it would work, but I get a permissions error until I finally created two completely separate tabs/pages.


I also need a custom VF page when both create an Inspection.


Any ideas? 


No, you don't have to create two seperate pages. Once the VF page is created, you need to make sure that Visualforce page is accessible by the Partner Portal Profile (go the Profile, and make sure its listed under the 'Enable Visualforce Page Access' related list). Secondly, also make sure that the Partner Portal profile has the proper field level security and crud permissions for the VF page to function properly.



Thanks Albert. I had already done that but I could not get it to work. After calling Salesforce they told me I needed to create two separate pages. Have you done this before without having to create separate pages?

Yes, I have deployed the same VF page in both portal and non-portal profiles, but primarily as Visualforce Tabs.


How are you deploying the page? As an Action Override? Or launched from a button? Tab? 

I was deploying them as an action override (for view and edit).

Yes, I just tried that and it worked fine. I configured the Action override. Then I verified the Portal Profile has the proper CRUD perms and I enabled the Visualforce page. Lastly, I logged into the portal, clicked on the Contact detail view which redirected me to the Visualforce page I had configured in the action override.



Ok, I'll double check everything to make sure there aren't any stupid mistakes. I appreciate you working on it with me.

I am also having VF portal problems.  I can't seem to get a Picklist to display.  It works beautifully if I am in as a SF user but as a Portal use the picklists do not display.  Do I have to build the picklist manually?


Thanks for any ideas...

Make sure the portal profile for the test user has the proper Field Level Security on the picklist field.
Fields viewable and editable by all.  ARGH!
Can you post your code or a snippet?

Here is a really simple one.  I thought maybe the extensions were causing a problem so I made a page that only displays the picklst value and only uses the Standard Controller.  Works fine in SF but not in Portal.

Thanks for any help.

<apex:page standardController="Label_Catalog_Number__c">
<apex:form >
<apex:pageBlock >

<b>Search Label Catalog</b><br/>
<apex:pageBlockSection columns="1">
<apex:inputField value="{!Label_Catalog_Number__c.Material__c}"></apex:inputField>
<apex:inputField value="{!Label_Catalog_Number__c.Material_Sub_type__c}"></apex:inputField>
<apex:inputField value="{!Label_Catalog_Number__c.Imprint_Process__c}"></apex:inputField>
<apex:inputField value="{!Label_Catalog_Number__c.Attachment__c}"></apex:inputField>
<apex:inputField value="{!Label_Catalog_Number__c.Label_Size__c}"></apex:inputField>

Salesforce API16.0 Salesforce API


Are any of those inputField's functioning properly? Is it just the picklist value that isn't working? Have you verified that the portal profile has the proper CRUD perms on this custom object? Do you see the page but the inputFields are read-only?
The object is Public Read Write. Checked Profile again and they have Read access and I added Edit too.  No change. 
OK, figured it out.  It was a permission thing.  Since I wasn;t passing an ID it was creating a record and the Profile did not have Create permission. Whew!  Thanks everyone.