Skip to content


Register real time data source for DELETE

Eugene asked 5 years ago
for some reason when I register my real time MS SQL data source with the map – I am able to do it for CREATE and UPDATE, but not for DELETE. Even though checkbox is present, I am not able to click it. I do need to be able to have an action on DELETE event, how do I do it?
Thank you!
Patrick Roth Staff answered 5 years ago
The option is there (because the realtime window is used for all the realtime sources) but currently isn’t hooked up for a delete event on SQL (or CRM I believe either).
I’m not 100% sure why that is not a feature – however I suspect it is because when the delete event happens in SQL, the realtime datasource query wouldn’t be able to find the deleted record- you’d only have the key values to work with.
If you do require a delete event, then you should be able to just look at the SQL create/update events and hand-create the same type of trigger but for delete.
The map itself I don’t think would know or care about the difference (although I haven’t tried this)
Eugene replied 5 years ago

hi Patrick,
I can surely create AFTER or BEFORE DELETE trigger manually by example with CREATE or UPDATE triggers.
I do need it cause I am using SmartConnect for exporting GP data in real time and if something is deleted in the source, I need to know about it so I can delete the same data at my destination.
Is there way to make my data source query “aware” of the deleted data which is available in the trigger via T-SQL so I can have something to pass to my map?

Patrick Roth Staff replied 5 years ago

The db trigger writes the key fields of the delete/changed/updated record into the change tracking table.

If you would like to submit an answer or comment, please sign in to the eOne portal.