The line throwing the error is:
public List<MyOutstandingReview> myOutstandingReviews{
The fuller context for the exercise in the training is:
// TODO: Create a public list "myOutstandingReviews", which contains elements
// of type MyOutstandingReview. Override the getter.
// If null (on the first access), instantiate a new list.
// Iterate over the list of review__c records called "reviews" in a FOR loop.
// For each Review__c record, instantiate a new object
// of type MyOutstandingReview. Pass the iteration variable to the
// constructor. Add the new object to the list "MyOutstandingReviews".
// Always return the newly created list "MyOutstandingReviews"
// Use the default setter.
public List<MyOutstandingReview> myOutstandingReviews{
get{
// perform the logic to find the Reviews that have not yet been completed for the current Position
if (myOutstandingReviews == null) {
myOutstandingReviews = new List<MyOutstandingReview>();
for(Review__c review:reviews){
MyOutstandingReview record = new MyOutstandingReview(review);
myOutstandingReviews.add(record);
}
}
return myOutstandingReviews;
}
set;
}
Thank you.
Context
3 respuestas
Hi ,
You might get an answer here - there are tons of really smart admins in this community - however, this Answers Community is focused on configuration and design questions. Programmatic questions are best submitted to the developer forums at
https://developer.salesforce.com
http://salesforce.stackexchange.com/
where the forums and participants are geared toward programming troubleshooting and support and the users there focus on code so you may get quicker answers as well as a wider variety of options.
PS: Mark a best answer as well so that thread is closed and help us to keep community clean.
Thanks
Vinay