locked
Tracking Deleted record in CRM 4. RRS feed

  • Question

  • How to track user who deletes perticular record in CRM 4 workflow. on On Delete trigger. i need to Log user who have deleted the record.
    BharatKumar Bambhaniya Software Developer.
    Thursday, July 29, 2010 12:04 PM

Answers

  • Hi Bharat,

    If you just want to store user information only, then you just need to write PreDelete plugin and through context.UserId you will get Userid of the user who have deleted this record.

    like

    Guid _CurrentUSer=context.UserId;

    Also if you just want to fetch extra information for the user then you can query systemuser entity for that.

    Let us know if you need any other help !!!

     


    Mahain : http://mahenderpal.wordpress.com
    Friday, July 30, 2010 6:10 AM
    Moderator

All replies

  • Hi,

    Check free Audit Plugin in codeplex


    Mahain
    My Blog
    Thursday, July 29, 2010 12:13 PM
    Moderator
  • That is a Pluginside, i need something to be able to track only user who deleted the record within Workflow. any idea? customer dont need to install any extra plugin. they need something out of the box.
    BharatKumar Bambhaniya Software Developer.
    Thursday, July 29, 2010 12:20 PM
  • you can also achieve this through Workflow, surely it will take time to generate records
    Mahain
    Thursday, July 29, 2010 12:23 PM
    Moderator
  • Mahi,

    I have used this solution, and as a matter of fact its working just fine on Create,Modify, and Delete actions, but on delete i am unable to track the person who has deleted the record at a time..  how to achieve this from workflow.


    BharatKumar Bambhaniya Software Developer.
    Friday, July 30, 2010 3:40 AM
  • Did you trac modifiedby ???
    Mahain
    Friday, July 30, 2010 4:13 AM
    Moderator
  • yes the modified by is the same as who has modified last time, and the modified on is also the same, it just not tracking down the user and time who deletes the record in modify.. i really need to get the user who deleted the record.. any depths..
    BharatKumar Bambhaniya Software Developer.
    Friday, July 30, 2010 4:40 AM
  • It seems because it's behaving like this beacuse of delete method, you will not get any detail as the record is deleted. So I will suggest you to create a simple plugin on Delete message and use PreImage to catures user details who have deleted record.


    Mahain
    Friday, July 30, 2010 4:59 AM
    Moderator
  • Can you tell me, how to do that in plugin. how i will get the information on the user who triggers delete action.
    BharatKumar Bambhaniya Software Developer.
    Friday, July 30, 2010 5:51 AM
  • Hi Bharat,

    If you just want to store user information only, then you just need to write PreDelete plugin and through context.UserId you will get Userid of the user who have deleted this record.

    like

    Guid _CurrentUSer=context.UserId;

    Also if you just want to fetch extra information for the user then you can query systemuser entity for that.

    Let us know if you need any other help !!!

     


    Mahain : http://mahenderpal.wordpress.com
    Friday, July 30, 2010 6:10 AM
    Moderator
  • Hey quick Question??

    any idea if i can capture the user who deleted, in the Workflow, as custom workflow activity... anythoughts to custom workflow activity that can bring user who triggers delete on record.. :)

     


    BharatKumar Bambhaniya Software Developer.
    Friday, July 30, 2010 6:49 AM
  • hi,

    I need to get the id for deleted record from crm could you help me ?


    mano_meee
    Sunday, January 2, 2011 12:18 PM