You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing an **$expand** operation while working offline, the structure of the result object is different from the online scenario and a different approach is needed to get to the linked data in this case. The following example demonstrates this:
Notice the empty `primarycontactid` property but an additional `[email protected]` property that let's us know how to get to the linked data that we need. Use the `id`, `entityType`, and `options` parameter of that property to construct an inner `Xrm.WebApi.offline.retrieveRecord` request. The following piece of code provides a complete example of how to do this:
// perform additional operations on retrieved records
318
+
}, function(error) {
319
+
console.error(error);
320
+
// handle error conditions
321
+
});
322
+
```
239
323
240
324
For more examples of retrieving multiple records using Web API, see [Query Data using the Web API](../../../../common-data-service/webapi/query-data-web-api.md).
0 commit comments