You need to sign in to do that
Don't have an account?
Ankit Singh 6
Adding Opportunity team to a opportunity
Hi
I have a trigger and a class which creates Follow Up opportunity based on stage, that is if stage is changed to 7. Closed/Won then it creates new follow up opportunity with all values same as parent opportunity except opportunity team.
We want opportunity team gets copied to new opportunity created.
Please guide me through.
I have a trigger and a class which creates Follow Up opportunity based on stage, that is if stage is changed to 7. Closed/Won then it creates new follow up opportunity with all values same as parent opportunity except opportunity team.
We want opportunity team gets copied to new opportunity created.
Please guide me through.
Yes Ashis is right I saw the field property is notwritable but I have tested below code it is giving teh readwrite access to the record .I am not able to access this blog as it is blocked for me .
Check below code an dtry to implement and bulkify your code if you need any helo please let us know .
All Answers
What I understood from your post that your code is working for new opportunity creation when you cange the opportunity stage to closed own .
Only thing is that you wnat to add OpportunityTeam Member for Opportunity .
If yes Please follow below steps .
1 .Assume you have created opportunity for Opportunity closed own .Now you have both opportunity Id in your scope .
With help of closed own Id you can get thp OpportunityTeam Member Record related to that .
below is the query help you .
SELECT Id,OpportunityAccessLevel,OpportunityId,TeamMemberRole,UserId FROM OpportunityTeamMember
Now you can create an OpportunityTeam Member by assigning all field value from above record onlything is that Opportunityid you need to assign with newly craeted Opportunity id .
Please have a look into below blog link.
http://blog.jeffdouglas.com/2011/03/17/opportunityaccesslevel-not-writable/
Let us know if it helps you.
Yes Ashis is right I saw the field property is notwritable but I have tested below code it is giving teh readwrite access to the record .I am not able to access this blog as it is blocked for me .
Check below code an dtry to implement and bulkify your code if you need any helo please let us know .