locked
Preventing Accidental Record Deletion on any Entity RRS feed

  • Question

  • Is there an option, or configuration or even third party tools that anyone's aware of to prevent accidental record deletion in MSCRM 4 ? That delete button is a dangerous one.


    - JB MJH
    Saturday, April 10, 2010 8:44 AM

Answers

  • You have 2 options.

    1. Set the security roles to not allow delete, maybe just for the security roles that you do not trust with the delete right.

    2. Detect if delete is performed by checking the event.Mode property in the form onsave event and then display a dialog to the user asking them if they really do want to delete the record. Obviously only works when you are on the form and will not be able to be used when deleting items from a list. Check this article here regarding the event.Mode http://mscrmtools.blogspot.com/2009/01/jscript-know-which-action-raised-onsave.html


    MSCRM Bing'd - http://bingsoft.wordpress.com
    • Marked as answer by MJHJason Monday, April 12, 2010 9:12 AM
    Saturday, April 10, 2010 4:15 PM
    Moderator
  • More over, if security roles or JavaScript are not relevant for your needs, you can develop a plugin that will perform business validation before accepting or rejecting the deletion.
    My blog : http://mscrmtools.blogspot.com
    You will find:
    Bulk Delete LauncherView Layout replicator
    ISV.Config Manager Form Javascript Manager
    Assembly RecoveryAnd others (use tool tag on my blog)
    • Marked as answer by MJHJason Monday, April 12, 2010 9:12 AM
    Monday, April 12, 2010 7:03 AM
    Moderator
  • More over, if security roles or JavaScript are not relevant for your needs, you can develop a plugin that will perform business validation before accepting or rejecting the deletion.

    My blog : http://mscrmtools.blogspot.com
    You will find:
    Bulk Delete LauncherView Layout replicator
    ISV.Config Manager Form Javascript Manager
    Assembly RecoveryAnd others (use tool tag on my blog)
    • Marked as answer by MJHJason Monday, April 12, 2010 9:12 AM
    Monday, April 12, 2010 7:04 AM
    Moderator

All replies

  • You have 2 options.

    1. Set the security roles to not allow delete, maybe just for the security roles that you do not trust with the delete right.

    2. Detect if delete is performed by checking the event.Mode property in the form onsave event and then display a dialog to the user asking them if they really do want to delete the record. Obviously only works when you are on the form and will not be able to be used when deleting items from a list. Check this article here regarding the event.Mode http://mscrmtools.blogspot.com/2009/01/jscript-know-which-action-raised-onsave.html


    MSCRM Bing'd - http://bingsoft.wordpress.com
    • Marked as answer by MJHJason Monday, April 12, 2010 9:12 AM
    Saturday, April 10, 2010 4:15 PM
    Moderator
  • More over, if security roles or JavaScript are not relevant for your needs, you can develop a plugin that will perform business validation before accepting or rejecting the deletion.
    My blog : http://mscrmtools.blogspot.com
    You will find:
    Bulk Delete LauncherView Layout replicator
    ISV.Config Manager Form Javascript Manager
    Assembly RecoveryAnd others (use tool tag on my blog)
    • Marked as answer by MJHJason Monday, April 12, 2010 9:12 AM
    Monday, April 12, 2010 7:03 AM
    Moderator
  • More over, if security roles or JavaScript are not relevant for your needs, you can develop a plugin that will perform business validation before accepting or rejecting the deletion.

    My blog : http://mscrmtools.blogspot.com
    You will find:
    Bulk Delete LauncherView Layout replicator
    ISV.Config Manager Form Javascript Manager
    Assembly RecoveryAnd others (use tool tag on my blog)
    • Marked as answer by MJHJason Monday, April 12, 2010 9:12 AM
    Monday, April 12, 2010 7:04 AM
    Moderator