Hi All,
We have a simple requirement: a Record Type with ID (Primary Key), AccountID, and DataSeqNumber. I need to retrieve the MAX(DataSeqNumber) for a specific AccountID. The record type is AccountInfo. Could you share a sample code using a!queryRecordType with the Aggregate function "MAX"?
-Thanks in Advance.
Discussion posts and replies are publicly visible
Here you can find sample code
a!queryRecordType( recordType: /*Add Record Here*/, fields: a!aggregationFields( measures: { a!measure( function: "MAX", field: /*Add filter column here*/, alias: "taxAmount_max_measure1" ) } ), filters: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: /*Add aggregated column here*/, operator: "=", value: "123" ) }, ignoreFiltersWithEmptyValues: true ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1 ), fetchTotalCount: true() )