Greetings, the below link explains how to call DA in Java script, very useful information.
Thanks to Jeff Eberhard
Whatever the case, there is a way that this can be done.
TL;DR: A dynamic action can be defined to fire on a “Custom” event which can be triggered using the jQuery $.event.trigger(“<eventname>”) method.
I’ve create an example here
Basically a dynamic action is created with the When Event set to “Custom”. When the Event is set to “Custom” a field prompting for the Custom Event is given. The value for the Custom Event can be any name that we want to name our custom event. In this example it is called “DAEvent”. With the “Custom” event the dynamic action still requires the Select Type field. Set the Select Type option to “DOM Object” and set the DOM Object field to “document”. The dynamic true actions can then be added to perform any functionality desired.
To run the Dynamic Action we then call the jQuery $.event.trigger method with the name of the Custom Event that we defined in the Dynamic Action. The following line will run the Dynamic Action we created (note that the value passed to the function is the name of the Custom Event we defined in the Dynamic Action).
Sometimes it’s amazing how this stuff works. Enjoy!!!