Query Entity: fetchtotalcount is not working
Dear Team,
Could someone help me to understand the below issue please.
I am trying to fetch the total count of the records from DB view. When I give fetchTotalCount=true it's throwing an error 'Expression evaluation error at function a!queryEntity [line 2]: An error occurred while retrieving the data. Details: Unexpected error executing query'. If I change the fetchTotalCount=false, it's working fine. Sample code is below:
a!queryEntity(
entity: cons!DB_VIEWS_DSE,
query: a!query(
selection:
a!querySelection(
columns: a!queryColumn(
field: "id"
)
),
pagingInfo:
a!pagingInfo(
startIndex: 1,
batchSize: 1,
sort: {
a!sortInfo(field: "id", ascending: false())
}
)
),
fetchtotalcount: true
)
