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
Onttu Lindeman 12Onttu Lindeman 12 

Account teams for the home page to display the team for a partner users account

I have community users in my partner community. I would like a home page component VF page that would pull the account team off their record and display the list. So all partners are related to an account so they should all link to an account team.
Rajesh3699Rajesh3699
Hey, 

As you mentioned create a VF page and add that for the community and in the page controller you can query the AccountTeamMember information either based on the account name or email Id of the logged in user.

Let me know if you need anything more

Thank You,
Rajesh.
Onttu Lindeman 12Onttu Lindeman 12
is the class wrote something like this? Feel like I'm fundamentally missing something and going down a wrong path. Thank you for your directions though, it's me who is confused.
public class MyProfilePageController {

    private User user;
    public List<AccountTeamMember> myTeam { get; set; }
    public User getUser() {
        return user;
    }

    public MyProfilePageController() {
         myTeam = [SELECT Id, AccountAccessLevel, AccountId, Account.Name, TeamMemberRole,UserId, User.Name FROM AccountTeamMember where AccountId =:user.Contact.AccountId];
        
   }
}

VF page

<apex:page standardController="Account" extensions="AccountTeamMemberController"> <apex:form > <apex:pageBlock title="List of Account Team Members" tabStyle="Account"> <apex:pageBlockTable value="{!atmList}" var="atm"> <apex:column value="{!atm.User.Name}"/> <apex:column value="{!atm.TeamMemberRole}"/> <apex:column value="{!atm.Account.Name}"/> <apex:column value="{!atm.AccountAccessLevel}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
Onttu Lindeman 12Onttu Lindeman 12
Can anyone help me correct my code?