+ Start a Discussion
Dhananjay Patil 12Dhananjay Patil 12 

How to change the permission sets via Apex

Hi Guys,
On Account Object there is a lookup field  callled as 'AccountManager' where I can assign the user(Lookup(User)). 
Now  there is a tab called as "Account Team " where I can add multiple users which I can modify.
Suppose A is the user who creates an account then he can add and modify the "Account Team " members.
and in the 'AccountManager'field if I add the user as 'B'.when I login to the application as B and navigating to the perticular account that was created by A then B can see the Account Team Member(Read Only) but can not add or delete it.

I have a requirement inwhich if any user who creates an account and add the user in 'AccountManager' field then Account Manager should  modify the team members. 

I know with manually it is possible but i am looking for a programatical way like writing an apex class then call its method in trigger.
It would be better if I get any example

Dhananjay Patil 12Dhananjay Patil 12
And the 'AccountManager' field is visible for only one account type called as 'Account Group'(There are 5 differents account category in our application.)