0

I am relatively new to coding in apex and have what appears to be an easy task, but am reading lots of mixed ideology on whether or not it can be done.

I am trying to create a field on the Account object that simply counts how many members are in it's account team, if an account team exists for it. That's it. Just one field with one value and a '0' if null. I am thinking it will end up being an after insert, update, delete and undelete? Help?

Hoping its as easy as it sounds and not one of those quirky things SF just can't do.

Thanks in advance for any input/guidance!

2

It can't (directly) be done, because AccountTeamMember doesn't support triggers. You would need to schedule a task to run periodically to sum the values of the AccountTeamMember table. As such, the values will not be updated in real time.

| improve this answer | |
  • That was starting to become the majority opinion from my research, backto the drawing board I guess. Thank you for the super quick response! – Alarmed_Win Jan 13 '18 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.