May 2019
Intermediate to advanced
546 pages
12h 41m
English
Let's create a page of a movie with the complete cast on one page. Based on the movie, we will select the cast of the movie and display this cast. We will start with the extension of the controller. We need a class that transfers the details of our movie to a class via the standard controller.
Open your Developer Console and create a new class with the following code:
public with sharing class MovieExtension { private final Id movieId; public Movie__c theMovie { get{ if (this.movieId != null){ // select the movie and the cast from the Id. // We select records always with a list, even if you know it should be a record. // if someone removes the record while you want to select it, you will receive an exception ...Read now
Unlock full access