Skip to main content
added 33 characters in body
Source Link
Ratan Paul
  • 22.8k
  • 14
  • 55
  • 99

You should just be able to look up at the Account's owner like(depending on api name of the master detail account relationship):

Select Account__r.Owner.Name c,Sum(Invoice_Amount__c)s 
  from Otter_FFA_Invoice_New__c where (Qad_Entity__c=:ent) 
   and (Otter_FFA_Effective_Date__c >=:CurrentMonthStartDate.toStartOfMonth() 
   and Otter_FFA_Effective_Date__c <=:Effective.Otter_FFA_Effective_Date__c) 
 Group By Owner.Name Limit 500 

You should just be able to look up at the Account's owner like(depending on api name of the master detail account relationship):

Select Account__r.Owner.Name c,Sum(Invoice_Amount__c)s from Otter_FFA_Invoice_New__c where (Qad_Entity__c=:ent) and (Otter_FFA_Effective_Date__c >=:CurrentMonthStartDate.toStartOfMonth() and Otter_FFA_Effective_Date__c <=:Effective.Otter_FFA_Effective_Date__c) Group By Owner.Name Limit 500 

You should just be able to look up at the Account's owner like(depending on api name of the master detail account relationship):

Select Account__r.Owner.Name c,Sum(Invoice_Amount__c)s 
  from Otter_FFA_Invoice_New__c where (Qad_Entity__c=:ent) 
   and (Otter_FFA_Effective_Date__c >=:CurrentMonthStartDate.toStartOfMonth() 
   and Otter_FFA_Effective_Date__c <=:Effective.Otter_FFA_Effective_Date__c) 
 Group By Owner.Name Limit 500 
Source Link
Jenny B
  • 10.6k
  • 3
  • 26
  • 51

You should just be able to look up at the Account's owner like(depending on api name of the master detail account relationship):

Select Account__r.Owner.Name c,Sum(Invoice_Amount__c)s from Otter_FFA_Invoice_New__c where (Qad_Entity__c=:ent) and (Otter_FFA_Effective_Date__c >=:CurrentMonthStartDate.toStartOfMonth() and Otter_FFA_Effective_Date__c <=:Effective.Otter_FFA_Effective_Date__c) Group By Owner.Name Limit 500