The trigger.new provides the records that are about to be inserted, or updated. Likewise trigger.old returns the value of records before update or delete. Rest is simple code to update the values of the new records. You’ll see on thing in this code, that an update command or insert command is missing. This is because the trigger is already a part of the DML process and hence we do not need to call another DML command, or else there are chances of having and trigger recursion. So it is always a good habit to avoid DML for the same object in a trigger.
Sunday, June 6, 2021
3:30 PM – 4:30 PM UTC
3:30 PM | Introduction |
3:40 PM | What is Trigger |
4:10 PM | How to write trigger |
4:30 PM | Q/A |
Community Group Leader