Hi,
I am looking for solution how to fetch by API contacts list sorted by ModifiedOn field in DESC order. I try to do such request:
POST https://010107-crm-bundle.bpmonline.com/0/dataservice/json/reply/SelectQ...
{
"RootSchemaName":"Contact",
"OperationType":"0",
"Columns":{
"Items":{
"Name":{
"OrderDirection":"DESC",
"OrderPosition":"ModifiedOn",
}
}
},
"AllColumns":true
}
But sort seems not to be applied. Thanks in advance for any help here.
Best,
Lukas
Like
You need to use OData.
https://academy.bpmonline.com/documents/technic-sdk/7-10/working-bpmonl…
The request URL will look like
string requestUri = serverUri + "ContactCollection?$orderby=Name";
Please note that it's not ok to select all of the contacts via API. If you have a lot of contacts, the request will take huge amount of time. I recommend to use a filtration and select only the data that you need.
string requestUri = serverUri + "ContactCollection?$filter = Id eq guid'" + contactId + "'";