Before insert: When using this event, the code block is executed before a new record is inserted. Before update: When you use this event, the code gets executed before a new record is updated in the object.