A form script on the account form must retrieve the active cases for the current account, returning only the case title, case number and priority. Which Client API call meets the requirement with the least data transferred?
Select an answer to reveal the explanation.
Short Explanation
Order exactly what you'll eat: $select picks the columns and $filter picks the rows, so the server does the trimming and your script gets a small plate. Pulling everything and filtering in the browser is ordering the whole menu to eat one dish.
Full Explanation
Xrm.WebApi.retrieveMultipleRecords takes the table logical name, here incident, and an OData query string. The $select option limits the columns returned to the title, ticket number and priority, and the $filter option restricts rows on the server: the customer lookup is filtered through its _customerid_value property, which holds the referenced record's ID, and statecode eq 0 keeps only active cases. Filtering on the server reduces payload, latency and the risk of hitting paging limits in the browser. Retrieving the account and expanding everything returns far more data than needed, wildcard expansion of every relationship is not a valid way to pull related rows, and filtering in the browser defeats the purpose. Calling retrieveMultipleRecords with no query returns every column of every case the user can read, a page at a time, and then discards most of it. The last call has two errors: the method expects the logical name, not the entity set name, and $top limits the number of rows rather than the number of columns, while filtering the lookup by its navigation property name does not work as written. Exam caveat: Microsoft recommends always using $select, because retrieving all columns hurts performance and can trigger unwanted dependencies. Operational check: run the call from the browser console on an account and confirm only the three columns appear in the response.