on 2025 Feb 11 12:02 AM
Hi,
I'm trying to understand how sync really works with Offline App.
I have an Order List downloaded in the Offline Store. Entity HeadSet.
The creation of Orders works correctly with a CreateEntity Action of HeadSet Entity inside a ChangeSet.
If I try to Edit an Order without change anything in the Header and send an Update request, the HeadSet, after Sync, seems not properly synced.
Steps:
If I try again a Sync, the order seems stuck and Backend do not receive any request.
To solve the problem I need to enter the Order, change something in the Header Data and Sync again.
After Sync:
This is the Update HeadSet Action Code:
{ "_Type": "Action.Type.ODataService.UpdateEntity", "ActionResult": { "_Name": "UpdateSalesOrderHeader" }, "Target": { "Service": "/app/Services/ServiceV2.service", "EntitySet": "HeadSet", "ReadLink": "/app/Rules/EditSalesOrder/GetHeaderReadLinkUpdate.js" }, "Properties": { "Bozza": "#Page:CreateSalesOrderHeaderData/#Control:FCOrderDraft/#Value", "Datachanged": "#Page:CreateSalesOrderHeaderData/#Control:FCDataChanged/#Value", "UM": "#Page:CreateSalesOrderHeaderData/#Control:FCUnitOfMeasure/#Value", "UMSt": "#Page:CreateSalesOrderHeaderData/#Control:FCUnitOfMeasureSt/#Value", "Ordertype": "#Page:CreateSalesOrderHeaderData/#Control:FCOrderType/#SelectedValue", "ShipTo": "#Page:CreateSalesOrderHeaderData/#Control:FCOrderShipTo/#Value", "OrderReason": "#Page:CreateSalesOrderHeaderData/#Control:FCOrderReason/#SelectedValue", "SoldTo": "#Page:CreateSalesOrderHeaderData/#Control:FCOrderSoldTo/#Value", "RifOrd": "#Page:CreateSalesOrderHeaderData/#Control:FCRefCustomer/#Value", "DataTassativa": "#Page:CreateSalesOrderHeaderData/#Control:FCOrderDeliveryDate/#Value", "SalesOrg": "IT01", "Sector": "00", "DistrChan": "MM", "DataCust": "#Page:CreateSalesOrderHeaderData/#Control:FCCustomerDate/#Value", "DelDate": "#Page:CreateSalesOrderHeaderData/#Control:FCDeliveryDate/#Value" }, "RequestOptions": { "SendEmptyUpdate": true, "UpdateMode": "Replace" } }
I think that there is a match with Uploaded Data and Downloaded Data but I'm not really sure.
Seems like Backend have different Header Order Data compared to Updated Entity Data.
What happens after sync ? How the framework recognize a not Synced Order ?
If this problem occurs how can be managed ?
Thanks.
Request clarification before answering.
I found a workaround and now I'm able to save correctly the Order to backend.
The workaround implies a programmatically simulation of change attribute in the Header Entity.
If I send a request without change attributes in Header Entity, the entire Order is stored in Offline Store and appears not synced (@SAP.isLocal = true).
I do not understand why this happens, but I would really like to understand it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.