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 

Site Server

I have created a Site Server and Configured the Customer Portal Also. Configure the site server as per the docs /details found in the manual provided in the site.

 

 

Now when i go through CONTACT Object and click option "Login as portal user" for a particular user or paste the URL and login, a particular controller along with visualforce page is working perfectly fine.

 

However when i go through SITE SERVER URL, after login in, i am getting an error message (mentioned below)

 

" Apex script unhandled exception by user/organization: 00590000000E7ME/00D900000000ZuT

Visualforce Page: /chikpea/index.jsp

System.QueryException: List has no rows for assignment to SObject

Class.InstallBaseExtension.getServBaseList: line 20, column 19
External entry point"

 

I am pasting below the method i wrote:

 

 public LIST<som__Service_Base__c> getServBaseList()
    {
       User usr = [select email from user where id = :userinfo.getUserID()]; <---- (Line 20, probably it is not getting USERID)
       contact y= [select account.name from contact where email= :usr.email];
       account a = [select id from account where name = :y.account.name];
       som__install_base__c d = [select id from som__install_base__c where som__Account__c = :a.id];
        
        return [select name, som__Service_Plan__r.name from som__Service_Base__c where som__Install_Base__c = :d.id];

    }

 

Can somebody help, how to resolve this issue. Is it an issue of passing userid parameters between login screen and ACTIVE SITE HOME PAGE, need help pls...