Saturday, 16 April 2016

Sum Aggregate - FetchXML Query

The following FetchXML calculates the sum of estimated value from opportunity entity.
  1. <fetch distinct='false' mapping='logical' aggregate='true'>
  2. <entity name='opportunity'>
  3. <attribute name='estimatedvalue' alias='estimatedvalue_sum' aggregate='sum' />
  4. </entity>
  5. </fetch>
To get the sum of values in a column:
  • Set aggregate to true in fetch node.
  • Set aggregate to sum in aggregate attribute.
- See more at:

1 comment:

  1. This is not difficult to do, especially for those who have long been dealing with this. I prefer to use different CRM systems hosted crm, it's easier to do with them, the main thing is that your CRM system had a large number of functionality.