Week 5: Using Before Triggers to Handle Complex Validations

Sometimes, you have to run some pretty hefty validations before permitting a record or workflow to be created, updated, or deleted. When simply poking around the console, it may leave you thinking that “this isn’t possible” using 8base.

Pardon me for bursting your bubble…but complex validations are totally possible in 8base. The answer is Trigger functions that run on a before action.

Using Before Triggers to Handle Complex Validations

Custom Functions allow you to write Javascript or Typescript functions that can be invoked by four different methods. Triggers specifically run before or after database events, like creating, updating, or deleting a record. This makes them the perfect tool for implementing some complex business logic or checking a 3rd party API before the operation gets run!

Using Before Triggers to Handle Complex Validations2

Go ahead and dive more into Custom Functions and Trigger Functions here in the 8base docs.