locked
CRM 2011- Give sales persons ability to delete Opportunity Products without giving ability deleting Opportunity RRS feed

  • Question

  • Good Day

    Is there a way of giving a sales person the ability to delete an Opportunity Product without giving them the ability of deleting an Opportunity?

    • Sales Assistant - Delete Opportunity Product
    • Sale Administrator - Delete Opportunity Products and Opportunity

    I was hoping to use Jscript to hide the delete button in the ribbon and disable the Jscript when Sales Admin needs to delete an Opportunity.  The Jscript works when the record is opened but the delete button is still available in the view that displays all opportunity records.

    I have no experience editing the SDK to remove the delete button and I guess this will result in me having to change it every time a Sales Admin wants to delete an Opportunity.

    Creating and implementing a plugin also looks like quite a task.

    Any alternative solutions are welcome or post/blogs that has in-depth steps in editing and implementing SDK or plugin for this specific problem.

    Thanks 

    Monday, October 7, 2013 7:01 AM

Answers

  • Hi,

    There are no specific privileges for the OpportunityProduct entity. So, if a user has read/write privileges on opportunity then he can edit/delete OpportunityProduct. You have two options now:

    1) Create a plugin that will check user's role and allow deletion of OpportunityProduct only if the user is system admin.

    2) Use Javascript/xml to remove Delete button from OpportunityProduct. Here is how you can do that: Remove/Hide default buttons on an Entity and here is how you can check for security roles and then allow only SystemAdmin user to delete the OpportunityProduct Hide/Show a button depending on a security role


    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful" Thanks, Imran Abbasi

    • Proposed as answer by Guido PreiteMVP Monday, October 7, 2013 10:54 AM
    • Marked as answer by Lylecwk Monday, October 14, 2013 6:50 AM
    Monday, October 7, 2013 10:47 AM

All replies

  • Hi,

    There are no specific privileges for the OpportunityProduct entity. So, if a user has read/write privileges on opportunity then he can edit/delete OpportunityProduct. You have two options now:

    1) Create a plugin that will check user's role and allow deletion of OpportunityProduct only if the user is system admin.

    2) Use Javascript/xml to remove Delete button from OpportunityProduct. Here is how you can do that: Remove/Hide default buttons on an Entity and here is how you can check for security roles and then allow only SystemAdmin user to delete the OpportunityProduct Hide/Show a button depending on a security role


    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful" Thanks, Imran Abbasi

    • Proposed as answer by Guido PreiteMVP Monday, October 7, 2013 10:54 AM
    • Marked as answer by Lylecwk Monday, October 14, 2013 6:50 AM
    Monday, October 7, 2013 10:47 AM
  • I used your link to "Hide/Show a button depending on security role", the Ribbon WorkBench tool worked well.

    Thanks for your proposed solutions.

    
    Monday, October 14, 2013 6:58 AM