on 2024 Dec 02 1:48 PM
In my MDK application, I am trying to access the backend's response through an OfflineOData Upload action.
Actions/UploadChanges.action:
{
"Service": "/MyApp/Services/MyService.service",
"_Type": "Action.Type.OfflineOData.Upload",
"ActionResult": {
"_Name": "upload"
},
"OnSuccess": "/MyApp/Rules/ErrorArchive/ErrorArchive_CheckForSyncError.js",
"OnFailure": "/MyApp/Actions/UploadFailureMessage.action"
}
As seen I have added the "upload" ActionResult. In the OnSuccess Rule I have added this code:
var uploadResult = context.getActionResult('upload');But the upload result is only this:
Object {data: null, error: undefined, status: 0, enabled: true}Tested with MDK-Client 24.7.0
Request clarification before answering.
@SW10 Error archive will list only the rejected requests from the backend.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@SW10 This an expected behavior. The ActionResult of the Offline upload action returns null. See documentation here.
In order to see if backend has rejected any request, you have to look into ErrorArchvie queue. You can find some details in this tutorial on how to enable error archive in an MDK app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.