I’m building an app to track movement of trucks through the process of installation. To capture each station, I had a trigger for if the record existed already as well as if it was complete. This ended up being around 15 triggers and would take around 10 seconds to run through all of them each time. I’m working on consolidating everything into a single trigger to speed things up, but this will end up with around 30 if then statements in that one trigger. Before i got too far, i wanted to know if there was a hard limit to what could be done in one trigger
Are you sure that would be faster?
Usually not the trigger itself is slow, but a specific action (handeling records or connector functions)…
However, 30 if/then statements sounds possible to simplify to me…
E.g. a good approach is to think of a “happy end” solution. That means check the no goes (sad ends) first and everything left is a “go”…
this ofen reduces layers and checks…
To give more advice we would need to see the logic/problem itself…
Also some of your if/thens can be nexted within expressions within the trigger actions, that has consolidated some things for me in the past.