You can set and event on your entity in your domain model.
See https://docs.mendix.com/refguide/event-handlers/
Hi Zia,
On entity level, you can create so called 'Event handlers'. This is a Microflow that will automatically trigger based on the event that you select. For example, before you commit an object or after you commit an object. If you for whatever reason don't want this action to happen for a specific Commit action, you can select 'Yes without events' which ensures that the Event Handler of that entity won't trigger for that specific commit action.
I hope this clarifies your query.