при попытке сделать пейджинг с fetchxml с группой, всегда pagecookies возвращают пустую строку и больше записей возвращают false
string fetchXml = @"
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' aggregate='true'>
<entity name='appointment'>
<all-attributes />
<attribute name='shiftstart' alias='shiftstartyear' groupby='true' dategrouping='year' />
<attribute name='shiftstart' alias='shiftstartmonth' groupby='true' dategrouping='month' />
<attribute name='shiftstart' alias='shiftstartday' groupby='true' dategrouping='day' />
<attribute name='contId' alias='contId' groupby='true' />
<filter type='and'>
<condition attribute ='status' operator='not-in'><value>2</value><value>3</value>
</condition>
<condition attribute ='contact' operator='eq' value ='" + contactId + @"' />
</filter>
</entity>
</fetch>";
string xml = CreateXml(fetchXml, PageCookies, pagenumber, pageSize);
// Excute the fetch query and get the xml result.
RetrieveMultipleRequest fetchRequest1 = new RetrieveMultipleRequest
{
Query = new FetchExpression(xml)
};
var returnCollection = ((RetrieveMultipleResponse)GlobalCode.Service.Execute(fetchRequest1)).EntityCollection;