20
Views
2
Comments
How to rollback Activity's status?

Hi everyone!


I need to add data to an entity after an activity has been closed (ActivityClose server action I am using). If the data addition fails, how can I revert the activity's status from closed back to active?


Thank you, 

2023-08-18 10-40-36
Deepak M
  1. Set Abort Transaction = Yes in the exception handler to roll back the whole transaction if you haven’t committed yet. This will keep the activity active automatically.
  2. If you already committed, update the activity status back to active manually in the exception flow.
UserImage.jpg
Ayaz Perwaiz

Hi Deepak!

Thank you very much for your answer. Yes, setting back activity status manually is one solution, but I was not looking for that.

I adjusted the logic to add the data first and then close the activity. This ensures that any errors during data addition don’t impact the activity’s status. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.