You create a LayerA with a custom event that is triggered after the system event AfterInitialize. The custom event action is to display a Toast message ‘A’.
You also create a LayerB (independent of LayerA) with a custom event that is triggered after the system event AfterInitialize. The custom event action is to display a Toast message ‘B’.
When applying LayerA followed by LayerB (or vice-versa), both events shoud be executed.
Reality :
When applying LayerA followed by LayerB, only the LayerB custom event is executed.
When applying LayerB followed by LayerA, only the LayerA custom event is executed.
I have attached the JSON generated when LayerA is applied first, followed by LayerB, and vice-versa. You can see both custom events in the JSON as expected, in the correct order … but only one is executed. LayerA_LayerB.txt (56.8 KB) LayerB_LayerA.txt (42.2 KB)
Questions : Is this a feature or a bug in our version (2021.2.11)? Is there a workaround if I want to initialize TransView values (using row-update) in LayerA, and initialize other TransView values in LayerB?
Layer order is important to avoid UI conflicts, but I would not have expected events to be impacted this way.
So, what’s happening here is you can only have one before/after event per event, so the child layer is taking priority over the parent layer.
This can be demonstrated if you create an event in a single layer (say “After” AfterInitialize) and then go make a second event in the same layer for the same “After” AfterInitialize; it won’t even show up in the list.
You’ll have to hook the child event into a different one. For instance, the parent could use “Before” AfterInitialize an the child could use “After Initialize”.