Blogs

  • Generate CSV using apex and email as attachment

    Read more…

  • 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…