Hi fellow community,
I wonder if any of you can shed som light on this. Accordgin to Basic operations on segments using API (Dynamics 365 Marketing Developer Guide) | Microsoft Docs this is the recommended way of retrieveing segment members:
POST {{OrgUrl}}/api/data/v9.0/msdyncrm_FetchContactsByQuery { "Query":"(SEGMENT(SEGMENT_CRM_ID_e1fa7fdc5c78ea11a811000d3a8e8fcc)).ORDERBY(fullname ASC).SKIP(0).TAKE(15).SELECT(contactid)", "FetchXml":"","OwningBusinessUnit":"0b4b85cc-7f6c-ea11-a811-000d3a54d359", "Scope":270100000, "TimeZone":null }
I'm having a hard time understanding why there is both a query and a FetchXML. It's seems like there's no limit to the number of result record from the query, while the fetch do have limitations. I tried the following:
Query:
(SEGMENT (SEGMENT_CRM_ID ) ).ORDERBY(mobilephone ASC).SKIP(5000).TAKE(1000).SELECT(contactid)
FetchXML:
My idea is that the query will fetch records from 5001 and to 6000, while the only thing the fetch does is to retrieve only the mobilephone attribute. Is this correct? If I then call this with a query saying SKIP(6000).TAKE(1000) - will it retrieve the next 1000?