Answered by:
Prevent Queue item Deletion

Question
-
I've got a requirement where i need to prevent users from deleting email activities in the Queue(only in Queue),if i set edit the privileges for the role the user won't be able to delete any email activities but i want to refrain the users in the particular role from deleting email activities "only in the queue"
Any swift response in this regard would be much appreciated.- Moved by Mathias Schiffer Sunday, June 7, 2009 1:16 PM English Language Post (From:Microsoft Dynamics CRM)
Sunday, June 7, 2009 12:46 PM
Answers
-
I don't have an example for this particular case, the idea is get the entity ID and type(email in your case), then check if the entity(queueitem) is in the queue, then prevent the delete action, you need to register the plugin as a pre-delete on email entity.
Cheers,
Jim
Jim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com , http://mscrm.cn- Marked as answer by Donna EdwardsMVP Saturday, July 4, 2009 7:14 PM
Friday, June 12, 2009 9:40 AMModerator
All replies
-
Hi Deepak,
You need a custom plugin to perform this action, the security role won't help in this case.
Cheers,
Jim
Jim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com , http://mscrm.cn- Proposed as answer by Jim Wang (Microsoft)Microsoft employee, Moderator Sunday, June 14, 2009 10:07 PM
Sunday, June 7, 2009 2:50 PMModerator -
Hi Jim,
Thank you for the reply.Could you please give me a better insight in to it -(i.e) which event do i need to register the plugin for the queue entity ? and do you have a same code which i can refer? Plz help as this is quite an urgent requirement
Thanks in AnticipationMonday, June 8, 2009 5:49 AM -
Can anyone help me in this regard?Monday, June 8, 2009 9:20 AM
-
I don't have an example for this particular case, the idea is get the entity ID and type(email in your case), then check if the entity(queueitem) is in the queue, then prevent the delete action, you need to register the plugin as a pre-delete on email entity.
Cheers,
Jim
Jim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com , http://mscrm.cn- Marked as answer by Donna EdwardsMVP Saturday, July 4, 2009 7:14 PM
Friday, June 12, 2009 9:40 AMModerator