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
PronowPronow 

Error while using StandardSetController

Hello there,

 

Following code is giving me unknown error:

 

String strFetchMatchesQuery = 'Select m.Project__r.Project_Title__c,m.Project__r.Template__r.Max_Estimated_Hours_for_Volunteer__c,m.Project__r.Projected_Hours__c, m.Volunteer__r.AccountId, m.Project__r.Organization__r.Name, m.Project__r.Volunteer__r.Name, m.Volunteer__r.Name, m.Project__r.Status__c,m.Project__r.Actual_Hours__c,m.Project__r.ProjectNickname__c,m.Project__r.Volunteer_Projected_Hours__c, m.Project__r.Name From Match__c m where m.Volunteer__c IN ('+ strVolunteerId + ') AND ( m.Project__r.Status__c = \'Active\' OR m.Project__r.Status__c = \'Closed\' OR m.Project__r.Status__c = \'Incomeplete\')';

 

lstMatch = Database.Query(strFetchMatchesQuery);

 

ApexPages.StandardSetController matchActivityStandardSet = new ApexPages.StandardSetController(lstMatch);

 

Well, I am tracking the the corresponding Customer User Portal in developer console. Loading the page causes above code to fire. And code execution status is coming as "Success". But, I am not able to track the problem.

 

Please help.

 

Thanks in advance.

Shiv ShankarShiv Shankar

Are you using try catch block ?

PronowPronow
No, I am not using try catch block. Shall I?
PronowPronow
Thank u..that solved problem.
PronowPronow
However, I am using try-catch block for same functionality but for list of some other objects, its giving error again.

Please help.