cancel
Showing results for 
Search instead for 
Did you mean: 

Revert ChangeSet in SAP MDK

0 Kudos
523

Hi,

I have an app in MDK that uses an Offline Store.

Due to some limitations in the backend, I need to make a list of UpdateEntities actions in a single $batch request. I achieved this using the ChangeSet action.

The problem that I have now is that if the service sends an error on the batch, the ChangeSet is left pending on the offline store, and it tries to send it again every time I sync the app, creating more errors and preventing the submission of new values.

I tried using the undo pending changes to the entities changed within the batch request but I get an error saying that “Nothing can be undone for the given entity.”.

How do I revert the changes made by a Change Set?

Thank you.

Best Regards,

Nuno Oliveira

View Entire Topic
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

UndoPendingChanges action discards all unsent/local requests (those haven't been uploaded/synced) that affect a specified entity. So, in your case it's not applicable.

You should look into handling the ErrorArchive , fix the affected entity and re-sync. (Have a look at this example)

0 Kudos

Hi jitendrakumar.kansal,

For what I understood of that example, an update is being sent to the problematic entity with a corrected value. The problem that I’m having is that since I need to send all the changes in a batch I can’t send a single update call to the failing entity. Also, apparently the change set that failed remains on the queue to be uploaded and keeps failing and that prevents the submission of a new one even if I make a batch with an updated call with correct values to the same entity.

This is why I need to revert or update the change set.