Delete action should not be performed RRS feed

  • Question

  • HI,

    My requirement is .. If i click the delete button of a record, the record should not be deleted. although i give confirmation to delete the record.. the record should not be deleted.. using a "Plugin"

    • Edited by Amy.4 Friday, March 28, 2014 11:10 AM
    Friday, March 28, 2014 11:01 AM

All replies

  • Hi Amy,

    I believe you're trying to restrict the deletion using a "Plugin". If that's the case, register the Plugin "Delete" Message and "Pre-Stage" of the Entity. And in the code throw InvalidPluginExecutionException. That should prevent the delete action. But you might want to perform some validations before you want to restrict deletion.

    Admin QuikView Solution for CRM 2013

    • Proposed as answer by Anupam Bishui Thursday, May 15, 2014 12:06 PM
    Friday, March 28, 2014 12:22 PM
  • Hi Amy,

    I am not sure exactly what is your business requirement but what I feel is that if u don't want to delete a record, simply remove the Delete Button.
    This will also improve the performance, although u can use the plugin anyday.

    Friday, March 28, 2014 12:35 PM
  • Hi Amy

    You can change the permissions on the user "Role" to stop them deleting any records that you require. Remember to set this on each Entity that you do not want anyone to delete from

    Friday, March 28, 2014 7:00 PM