• mwoodall
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I have a simple extention that sums a particular contact field for all contacts of an account.  Here is the method extracted from the extention class:

 

    public AggregateResult getSalesTotal() {
        AggregateResult salesTotal =
            [SELECT SUM(Contact.Num_Orders__c) total
            FROM Contact];
        return salesTotal;

    }

 

Can I access the 'total' field from within Visual force?  I was expecting that {!SalesTotal.total} would work.

 

I know how to get the value within the Apex class method, but would rather pass the whole object and extract the fields using Visualforce.

 

Thanks.

I have a simple extention that sums a particular contact field for all contacts of an account.  Here is the method extracted from the extention class:

 

    public AggregateResult getSalesTotal() {
        AggregateResult salesTotal =
            [SELECT SUM(Contact.Num_Orders__c) total
            FROM Contact];
        return salesTotal;

    }

 

Can I access the 'total' field from within Visual force?  I was expecting that {!SalesTotal.total} would work.

 

I know how to get the value within the Apex class method, but would rather pass the whole object and extract the fields using Visualforce.

 

Thanks.