I would like to subscribe to updates (Create/Update/Delete) for DOM instances of a specific DOM Definition. Is this possible?
Hi Michiel,
This is perfectly possible. Seems like the documentation was missing a section for this. I just created a pull request that will add an example to the 'Filtering CRUD events' section of the 'DOM events' page. The addition should be visible soon.
In general, you can add a 'SubscriptionFilter<TEvent, TType>' filter type to your subscription filter list when subscribing. The constructor accepts a 'FilterElement<TType>' that you can use to filter on the 'DomDefinitionId' field of a DOM instance. The example in the docs should reflect your use-case. Make sure to always unsubscribe and remove your event handler at the end of your scripts, also in cases where exceptions have occurred using a 'try/finally' statement.
Hi Michiel
With the ExecuteScriptOnDomInstanceActionSettings object you can pass the names of the scripts that should be executed after a DOM Instance is created, updated, or deleted.
The DOM Editor script can be used to configure this object. You will find the fields shown below in the Manager Settings page of the Module to which your Definition is linked.
Kind regards
Hi Michiel, the goal is that we provide a solution and that users can subscribe on it without needing to adapt the DOM model. Is there another way that users can subscribe without making this model change?
Not that I’m aware of to be honest.
The pull request has been merged, so the change should be live soon.