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

Announcements

News and Announcements icon
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,064 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 51 Super User 2026 Season 1

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#3
Nagaraju_Matta Profile Picture

Nagaraju_Matta 50

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans