O'Reilly logo

Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition by Jason Ouellette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sample Implementation

Listing 10.23 contains the controller code for the utilization Visualforce page, and Listing 10.24 contains the page itself. This implementation brings together the three elements discussed in this section: the user interface to calculate utilization, the utilization computation itself, and the Web service callout.

Listing 10.23 Sample Code for Utilization Controller

public class UtilizationController {  public Timecard__c card1 { get; private set; }  public Timecard__c card2 { get; private set; }  public Boolean shared { get; set; }  public Decimal utilization { get; private set; }  public Decimal totalHours { get; private set; }  public Integer totalResources { get; private set; }  public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required