Trigger to update number of contacts associated with account

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 2024

ความคิดเห็น • 16

  • @Cyrus_Michael
    @Cyrus_Michael 2 ปีที่แล้ว +1

    You helped me a lot because with your video I solved a similar problem that I had at my internship. Thanks. May God Bless You

  • @burthug
    @burthug 2 ปีที่แล้ว

    Thanks for the video instructions. This is exactly what I need to add to Account records. However, Count field doesn't update for existing Account records unless I delete or add new contacts. How can I push this trigger for all accounts so that existing account records get the contact count?

  • @sevdadalklc8410
    @sevdadalklc8410 2 ปีที่แล้ว +3

    In line4 if we use Set for IDs it will be better instead of List

  • @nagarajuk1752
    @nagarajuk1752 2 ปีที่แล้ว

    if we change the accountId in the contact record then also it should update the contact count
    ur suggestion, please

  • @srinivaspatil411
    @srinivaspatil411 ปีที่แล้ว

    Nice mam 💥

  • @karnatianil3801
    @karnatianil3801 3 ปีที่แล้ว

    good madam,what about contact is associated to another account update will done r not(i am not getting update)

  • @shahrukhkhan-ub5to
    @shahrukhkhan-ub5to 2 ปีที่แล้ว

    What if we edit the contact and chage its parent account to another account then what happen in count?it is still remains same or get decrease???

  • @tusharsuyawanshi843
    @tusharsuyawanshi843 2 ปีที่แล้ว

    Please, do count trigger on parent to child.

  • @coolkiran100
    @coolkiran100 2 ปีที่แล้ว

    Line 11... select id from contacts..
    Why u take contacts instead of contact?

  • @coolkiran100
    @coolkiran100 2 ปีที่แล้ว

    why you take contacts? From where u hav taken contacts?

    • @memesv3.093
      @memesv3.093 2 ปีที่แล้ว

      Because when writing Parent to child relationship (i.e reaching child via Parent object), we use relationship name. Here we're trying to reach contact record(Child) in Account query (Parent), Hence we use relationship name i.e 'Contacts'

    • @sevdadalklc8410
      @sevdadalklc8410 2 ปีที่แล้ว

      it is relationship name

  • @balajiprakasam
    @balajiprakasam 3 ปีที่แล้ว +1

    Hmm

  • @rohitpathak941
    @rohitpathak941 2 ปีที่แล้ว

    please help. insert 500 account records with related contacts apex program