1

I am facing one issue while creating event on account. Its showing Insufficient Access Error on Account. The user is in account team with full acess on account. But still i am getting the error with that user. Please refer below snapshot. enter image description here

The hightlighted rows have same user. Suppose User A.

Now, the below screenshot is of the Account team member, enter image description here

Can someone please explain why in the first snapshot its displying as Account Team in reason with different access levels than account team.

Thanks, Supriya.

Below is the code to add in account share and account team object. for(Account acc: accountList) {

                 AccountShare aShare=new AccountShare();
                aShare.AccountAccessLevel='Edit';
                aShare.AccountId=acc.Id;
                aShare.CaseAccessLevel='ReadOnly';
                aShare.OpportunityAccessLevel='Edit';
                aShare.UserOrGroupId=UserMap.get(acc.id);
                AccountShareList.add(aShare);

                AccountTeamMember aTeam=new AccountTeamMember();

                aTeam.UserId=UserMap.get(acc.id);
                aTeam.TeamMemberRole='Special User';
                aTeam.AccountId=acc.Id;
                accountTeamMemberList.add(aTeam);


        if(AccountShareList.size() >0){
            if (!Test.isRunningTest()){
               Database.SaveResult[] result = Database.insert(AccountShareList, false);
            }
        }    
        if(accountTeamMemberList.size() >0){ 
            Database.SaveResult[] result = Database.insert(accountTeamMemberList, false);
        }     

    }
0

In the first Table, User and Group Sharing, there are two records for the same User.

Account Access = Full Access for owner, means this user will able to create Account Team Members for that account.

Also, That user has been assigned to the Account Team where he has ReadOnly access to the account. It may be possible default account team has already been setup.

| improve this answer | |
  • Thanks Santanu. But we are giving edit access on account, Opportunity and Case using trigger. Still its showing different access levels. Can you please help me to understand why is this? No default team is there for the user. – Sanjana Jul 24 '18 at 11:36
  • Can you edit question and add your code, the more clear about question, you will get more suitable answers – Santanu Boral Jul 24 '18 at 12:11
  • I have edited my question with code. Even if i am inserting share record with edit access on accounts, its showing default access levels in sharing detail. Please help. – Sanjana Jul 25 '18 at 6:42

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.