function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Laura StanleyHubbardLaura StanleyHubbard 

Account Team Members added to List View

I need help with code or trigger as I'm trying to do the following

Take Account Team Members that have a certain role (i.e. Payroll Services Represenative), pull their userID, and then add that value to a Case List View for the Payroll Queue where that UserID is the Payroll Services Representative on that account.

Is this posisble? Account Teams don't seem to be linked anywhere. We thought about creating a field on the account page detail that pulls this info. Then, the case should be able to link to that custom field. Thoughts? Coding help?
pconpcon
Unfortnately you cannot do this the "easy" way since you cannot write triggers against AccountTeamMembers.  You could do this with some sort of scheduled apex where you query the AccountTeamMember object for the TeamMemberRole that you are looking for.  Then update the list view.  It would not be real-time but you could get it "pretty close."  You would also need to remember not to add someone who is already on the list view.