My requirement is to update the account field when any account team member is added to it.

the below trigger invoke only when I made some changes in the account.

trigger AccountTeam on Account (after insert,before update, after update) {

WF, process builder doesnot provide accountteam How to update the account field when any new member is added to the account as a team member.


You have written a trigger on Account which won't fire on when a AccountTeamMember is inserted AccountTeamMember.

Unfortunately Triggers are not supported on AccountTeamMember Object.

You have few options:

  1. With a VF page- Best option:

    • Create a visualforce page to manage Account team members. Write logic in controller to update field on Account based on AccountTeamMember.
  2. Batch apex- no real time updates:

    • One other option is to use a batch apex, but the changes would not be in real time.
  3. Using a shadow object:

    • Create a shadow object, and write a trigger on it to update actual Account Team Member.
|improve this answer|||||
  • Hi Rahul, for me a scenario is Account team is creating/updating through integrations..I am looking at the 3rd option of creating shadow object..Can you please share more info how to implement this. – user7601 Jul 10 '17 at 11:13

AccountTeamMember object doesn't support Apex trigger. Still, you have couple of options

  1. Create a trigger on Account object. It will only work when an account is updated or inserted. Not on Account Team Member addition. This won't while inserting AccountTeamMember record via Data Loader.

  2. Write a batch Apex that will fire every night, to perform the job.

  3. Create a Flow to update Account field and embed it on a Visualforce page. It will work when account team member is added to an account or Account is edited or inserted. But this won't while inserting AccountTeamMember record via Data Loader.

|improve this answer|||||

I realize this is an old post but, there is a solution Now Available on the AppExchange! - Custom Account Team Management System (CATMS) - The CATMS app allows you to build triggers and other automation that will execute when Account Team Member Records are Created, Edited or Deleted, while maintaining and enforcing access security and standard functionality for Account Teams.

|improve this answer|||||
  • 1
    Are you affiliated with this application? Stack Exchange policy requires you to disclose any affiliation. – David Reed Mar 4 '19 at 4:00

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.