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
InfantInfant 

Customer Portal

hi,

 

pls find the code of the custom controller below:

 

public LIST<som__Service_Base__c> getServBaseList()
    {
   return [select name from som__Service_Base__c ];

    }

Code in Visualforce Page:

  <apex:pageBlockTable value="{!ServBaseList}" var="c">    
            <apex:column value="{!c.name}"/>
          </apex:pageBlockTable>
 

 

when i access this method from the visual page at the run-time (login id : x) it is printing out/displaying the contect/list of the custom object.

 

However the same when i go to customer portal (login id:y whose profile is customer portal user) and click the TAB ( i have mapped the PAGE in the custom tab), it is not showing the data, can somebody please help what can be the reason.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
aalbertaalbert

Have you added this page and controller to the customer portal profile so the portal has access? Secondly, to debug, you can enable Debug Logs (Setup->Administration Setup->Monitoring) and enable it specifically for the Customer Portal username. Then re-run your test case to generate the logs and see if any errors are displayed. Ideally you have System.debug messages in your apex too.

 

I hope that helps. 

All Answers

aalbertaalbert

Have you added this page and controller to the customer portal profile so the portal has access? Secondly, to debug, you can enable Debug Logs (Setup->Administration Setup->Monitoring) and enable it specifically for the Customer Portal username. Then re-run your test case to generate the logs and see if any errors are displayed. Ideally you have System.debug messages in your apex too.

 

I hope that helps. 

This was selected as the best answer
InfantInfant

i am not sure where i am making mistake or overlooking. I checked the following but still the issue persist. Can you tell me if i am missing anything.

 

i. under setup->apex class-> selected the custom controller and added the profile "customer portal user" by clicking security option

ii. Went to Adminstration Setup->Security Controls-> Field Accessibility, checked the profile and found the field i am accessing has REQUIRED FIELD Access
iii. Also checked the PAGE, it has given right to Customer Portal User Profile.
iv. Also check Adminstration Setup->Manager Users->Profiles, selected the customer portal user profile, found the object and the field as ticked (REQUIRED).

 

Is there anything else i need to do.