Hi all, Im triyin to do a offline retrieve to update workorder estatus related to a parentworkorder, but the code does nothing:
Here a part of the code:
var data = { "startdate": date, "msdyn_systemstatus": 690970002 }; Xrm.WebApi.offline.retrieveMultipleRecords("msdyn_workorder", "?$select=msdyn_workorderid&$filter=_msdyn_parentworkorder_value eq " woid).then( function success(result) { alert(result.entities.length); for (var j = 0; j < result.entities.length; j ) { relatedwo = result.entities[j].msdyn_workorderid; Xrm.WebApi.offline.updateRecord("msdyn_workorder", relatedwo, data).then( function success(result2) { // perform operations on record update }, function (error) { console.log(error.message); // handle error conditions }); } Context.data.save(true); }
What a I need to do to fix it??
Hello, we have configured mobile sync offline, the code works but not right, the recovery gives me 1612 records instead of 3, it is as if it does not respect the filter of the odata query
Hi,
The official documentation about Xrm.WebApi.offline says that:
When in the offline mode, these methods will work only for tables that are enabled for mobile offline synchronization and available in current user’s mobile offline profile.
Please make sure that you have configured mobile offline synchronization for your mobile app. Here is the steps: Configure mobile offline synchronization | Microsoft Docs
And there are also some checkpoints in the above screenshot – Important section, which also need to be checked.
If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.
Best Regards,
Nya
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156