locked
How to retrieve the modification date and time. RRS feed

  • Question

  • Hi everyone,



    I have retrieve all attributes and their values for each and every Sales Entities(like lead, contact, account opportunity...and so on.) using Fetch method.
    and saved all attributes values in SQL-Database Tables.

    Now I DO NOT want to retrieve any of entities and their any of attributes whenever my application gets run till they are modified by someone.
    but I don't know the way how to do it.


    Q1. should I retrieve the values of 'modifiedon' for each record of each entity?(I don't think its a better way.)
    Q2. Is their any configuration or setting that get me know the modification date-time.
    Q3. any sample xml would be helpful.


    any help would be very appreciative.

    Thanks in advance
    vsaifi.

    Thursday, January 8, 2009 11:19 AM

Answers

  • Hi Vsaifi,

    I'm not so sure about your full requirements, but seems like you're trying to build some kind of audit trail logs.

    You can utilize Plugin feature to hook on the update message of the certain entities. When the event inside the plugin is invoked, you can retrieve several important information regarding who update the record and when the record is getting updated.

    Another alternative is by using workflow.

    You can refer to the following article for references :

    http://www.unitek.com/training/microsoft/crm/blog/2008/02/27/creating-an-audit-trail-in-microsoft-crm-40/

    http://blogs.msdn.com/crm/archive/2008/04/10/using-workflow-to-maintain-an-audit-log.aspx

    Regards,

    hadi teo
    haditeo.wordpress.com
    Thursday, January 8, 2009 2:10 PM

  • On http://code.msdn.microsoft.com/auditing4crm
    you can find audit plugin, it might be useful for you.
    Friday, January 9, 2009 12:49 PM

All replies

  • Hi Vsaifi,

    I'm not so sure about your full requirements, but seems like you're trying to build some kind of audit trail logs.

    You can utilize Plugin feature to hook on the update message of the certain entities. When the event inside the plugin is invoked, you can retrieve several important information regarding who update the record and when the record is getting updated.

    Another alternative is by using workflow.

    You can refer to the following article for references :

    http://www.unitek.com/training/microsoft/crm/blog/2008/02/27/creating-an-audit-trail-in-microsoft-crm-40/

    http://blogs.msdn.com/crm/archive/2008/04/10/using-workflow-to-maintain-an-audit-log.aspx

    Regards,

    hadi teo
    haditeo.wordpress.com
    Thursday, January 8, 2009 2:10 PM

  • On http://code.msdn.microsoft.com/auditing4crm
    you can find audit plugin, it might be useful for you.
    Friday, January 9, 2009 12:49 PM
  • Thanks.. let me check..!!
    Monday, January 12, 2009 7:00 AM