You need to sign in to do that
Don't have an account?

What is the default value of OpportunityTeamMember.OpportunityAccessLevel? Was it changed in the recent releases?
Hello there,
I have written an apex class that would create OpportunityTeamMember records ( API ver 32 ). What is the default value of field - OpportunityAccessLevel?
I think it was Read/Write. Now I think with Salesforce Summer 16 release it is changed to Read-Only.
One more think I am noticing that older records of OpportunityTeamMember created with reason Sales Team with Access Read/Write were changed to Read-Only.
Any guesses ?? :)
Thanks in advance.
I have written an apex class that would create OpportunityTeamMember records ( API ver 32 ). What is the default value of field - OpportunityAccessLevel?
I think it was Read/Write. Now I think with Salesforce Summer 16 release it is changed to Read-Only.
One more think I am noticing that older records of OpportunityTeamMember created with reason Sales Team with Access Read/Write were changed to Read-Only.
Any guesses ?? :)
Thanks in advance.
Please look at this blog from Jeff Douglas.
I was working on a project the other day where I needed to dynamically add users to an opportunity's Sales Team (OpportunityTeamMember object) so that users who do not normally have access to an opportunity based upon Org-wide security settings can work on the opportunity with other team members. One of the advantages of Sales Teams is that you can specify the level of access that each team member has for the opportunity. Some team members may need read/write access while others may just need read-only access.
From the opportunity page layout, you can add a new team member and specify their access level and role.
However, by default when you create a new team member via Apex, the platform grants them read-only access. So I tried to specify grant "Edit" (read/write) access with the following code. Specifying the OpportunityAccessLevel threw the following error when saving my class: To be fair, the docs(https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunityteammember.htm) state that OpportunityAccessLevel is not creatable but it used to be with earlier versions of the API so I really wanted this to work and it was screwing up my day.
So here's the solution that I can up with in case anyone is looking for an answer. You need to add the team members to the opportunity and then update the sharing access to the opportunity for these users. Kindly mark this post as solved if the information help's so that it gets removed from the unanswered queue and becomes a proper solution which results in helping others who are really in need of it.
Best Regards,
Nagendra.P