How to call a microflow from cancel button of a popup screen?

Hi all, I am creating some objects and committing them before opening a popup. I am opening this popup to change the data. When I click on cancel button then I want to delete the object which I have created before opening this popup. Committing the object is required for me. How can I do this? Anyone can help me with this. Thanks in advance. - Venkat
1 answers

Remove the default cancel button and replace it with a button that calls a microflow , do your logic then add “close page” activity , remember to change as well the pop-up close action button in the page properties