Blogs

  • Why Before Trigger should not have DML for other objects

    if you update or delete a record in its before trigger, or delete a record in its after trigger, you will receive a runtime error. This includes both direct and indirect operations. For example, if you update account A, and the before update trigger of account A inserts contact B, and the after insert trigger of contact B queries for account A and…

    Read more…

  • Apex Trigger Practice (3) – Trigger on Attachments to count the number of attachments

    Question Hints: Account is standard object and attachment is child object. Requirement: We need to create an Apex Trigger on Attachments to count the number of attachments on the object – let’s take Account – and store in number field “Number of attachments”. Trigger is considering all the possible scenarios in this – after insert, after…

    Read more…

  • Apex Trigger Practice (2) – update the Contact based on Contact Role

    Question Related Components: Requirement: Implementation Verification: Upload your code in Github and provide the link of public repo in comment below, it will be reviewed based on availability and feedback will be shared. P.S: Be honest, watch the clock to check your efficiency. Happy coding.

    Read more…