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
cinov8cinov8 

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? 

aalbertaalbert

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.

 

 

cinov8cinov8
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?
aalbertaalbert

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? 

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

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.

 

 

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

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...

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

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>
</apex:pageBlockSection>


</apex:pageBlock>
</apex:form>
</apex:page>
Name
Version
Namespace
Type
Salesforce API16.0 Salesforce API
 

 

aalbertaalbert
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?
elyb527elyb527
The object is Public Read Write. Checked Profile again and they have Read access and I added Edit too.  No change. 
elyb527elyb527
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.