Handle Error Archive in an MDK App
- How to access Error Archive entity set to display local upload failure
- How to handle a logic failure errors
- How to fix these errors
Prerequisites
- Tutorial group: Set Up for the Mobile Development Kit (MDK)
- Install SAP Mobile Services Client on your iOS or Android device.
Android!
iOS
(If you are connecting toAliCloud
accounts then you will need to brand your custom MDK client by allowing custom domains.)
You may clone an existing project from GitHub repository and start directly with step 6 in this tutorial.
You have built an MDK app with offline functionality. In offline store, you make a change to a local record and upload this change (from request queue) to backend but backend prevents this change to accept due to some business logic failure. This error is recorded in an Offline OData specific entity set named as ErrorArchive
. This entity set has detailed information about the errors. It’s now up-to developers how they handle such errors and then let users to fix it from the app by providing the correct values. ErrorArchive
is exposed to the application as an OData entity set and is accessible through the OData API in the same way that the application accesses any other entity sets from the offline store. You can find more details about ErrorArchive
Entity Properties.

In this tutorial, you need to carry out the following tasks in order to understand how to display and handle such errors:
- Create a new project in SAP Business Application Studio using MDK CRUD Project template
- Access Error pages displaying records rejected by backend
- Create a business logic to find the affected entity
- Navigate to the affected record to handle the error
For this tutorial, you will use Mobile Services sample backend destination. You will modify a
PurchaseOrderHeaders
record by changingCurrencyCode
field. Offline store saves this record in request queue database and when you sync it with backend, backend prevents updating this record due to business logic failure. This failure record will be listed in Error list page, from here, you can navigate to details page for more information. You will implement a logic to navigate from details page to the affected record.