web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Mobile Offline - Web Api Offline Retrieve

(0) ShareShare
ReportReport
Posted on by

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??

I have the same question (0)
  • Suggested answer
    Nya Profile Picture
    29,060 on at

    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.

     pastedimage1622439406301v1.png

    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

  • Community Member Profile Picture
    on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 61 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 31 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans