+ Start a Discussion
Basha sk 16Basha sk 16 

How should i prevent the inactive users deletion in opportunity team members in opportunity related list?

Hi All,

Could anyone help on this

How should i prevent the users to delete the in active users in opportunity team members in opportunity related list?

Thanks In Advance,
Basha
Best Answer chosen by Basha sk 16
NagendraNagendra (Salesforce Developers) 
Hi Basha,

Ist Approach:

That is not possible without code.  And, even with a trigger on OpportunityTeamMember, you would have to be very, very careful about detecting the user making the change, and the type of change (you want to allow 'create' but not Edit or Delete).  Probably you will want to use a custom permission or custom setting to specify the users to be restricted in this manner so you don't have to update code for each change.You need write some code in order to achieve it. 

Please Refer (http://automationchampion.com/2013/09/19/trigger-on-opportunity-team-member/)

2nd Approach:

One of the other options that you can explore is to create two separate Opportunity page layouts 
  • One for Admins (who are allowed to add/edit/delete opportunity team members) - Show the 'Opportunity Team' related list on this page layout
  • Another one for all other users who are not allowed to edit/delete the team members - Remove the 'Opportunity Team' related list from this page layout
As a non-coding approach, use 2 different page layouts for the Opps -- 1 with the Opp Team related list, the other without.  Users can't change what they can't see.

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


 

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Basha,

Ist Approach:

That is not possible without code.  And, even with a trigger on OpportunityTeamMember, you would have to be very, very careful about detecting the user making the change, and the type of change (you want to allow 'create' but not Edit or Delete).  Probably you will want to use a custom permission or custom setting to specify the users to be restricted in this manner so you don't have to update code for each change.You need write some code in order to achieve it. 

Please Refer (http://automationchampion.com/2013/09/19/trigger-on-opportunity-team-member/)

2nd Approach:

One of the other options that you can explore is to create two separate Opportunity page layouts 
  • One for Admins (who are allowed to add/edit/delete opportunity team members) - Show the 'Opportunity Team' related list on this page layout
  • Another one for all other users who are not allowed to edit/delete the team members - Remove the 'Opportunity Team' related list from this page layout
As a non-coding approach, use 2 different page layouts for the Opps -- 1 with the Opp Team related list, the other without.  Users can't change what they can't see.

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


 
This was selected as the best answer
Basha sk 16Basha sk 16
Thanks for giving the reply.