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"
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.
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.
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