Cmdlets for Salesforce

Build 25.0.9434

ServerSideAggregation Parameter (Connect-Salesforce Cmdlet)

Specifies whether aggregation operations such as SUM, COUNT, and GROUP BY should be performed on the Salesforce server or handled by the client.

Syntax

Connect-Salesforce -ServerSideAggregation bool

Data Type

bool

Default Value

true

Remarks

When ServerSideAggregation is set to true, the cmdlet pushes aggregation logic to the Salesforce API, reducing client-side processing and improving efficiency for smaller or well-structured queries. However, there are limitations with server-side aggregation. For example, if you run an aggregation query on a non-primary key field that returns more than 2,000 records, Salesforce may return an EXCEEDED_ID_LIMIT error. In these cases, setting ServerSideAggregation to false forces the cmdlet to perform the aggregation on the client side, allowing the query to complete without hitting this limitation.

Enabling server-side aggregation offloads processing to Salesforce and can significantly improve query speed for supported operations and smaller result sets. However, large aggregations on non-primary key fields may fail due to API limits. Disabling this property shifts aggregation processing to the client, which can avoid API errors but may increase local resource usage and processing time.

This property is useful when working with large datasets or queries that aggregate on non-primary key fields, allowing flexibility to handle limitations in Salesforce’s aggregation capabilities.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434