locked
Audit report on Opportunity entity RRS feed

  • Question

  • Hi All,

    I"m using MSCRM 2015(online), how can i create a SSRS report on opportunity audit with fetchXML query, can anyone please help or guide me on this.

    Thanks,

    Shiva.

    Thursday, August 25, 2016 6:04 AM

All replies

  • If you already know how to create a fetch based SSRS report Audit report is doable. Just that you need to study the audit table metadata and  know what you need from the table and also you must do the fetchxml yourself.

    Before all that, Audit need to be enabled for opportunity and also for the fields which you want audited. Below links can help you get started

    http://www.resultondemand.nl/support/sdk/e93d3a36-9732-4e90-b0d1-9a0c3e17a680.htm

    http://www.resultondemand.nl/support/sdk/b9014a07-c540-4606-86a2-3e1f473ee5cf.htm


    If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com

    Friday, August 26, 2016 2:16 AM
  • Hi,
     
    You can use the below fetch XML to query CRM.
     
    <fetch version="1.0output-format="xml-platformmapping="logical"distinct="false>
        <entity name="audit>
            <attribute name="userid/>
            <attribute name="createdon/>
            <attribute name="operation/>
            <attribute name="attributemask/>
            <attribute name="auditid/>
            <attribute name="transactionid/>
            <attribute name="objectid/>
            <attribute name="action/>
            <order attribute="createdondescending="true/>
        </entity>
    </fetch>
     
    In the above query Object Id, defines the entity against which the audit log record is.
     
    After querying the CRM and once you have the details, you can later on manipulate the data in the report as per your requirement.
     

    HTH!


    Inogic | Blog | news@inogic.com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Tuesday, August 30, 2016 8:50 AM
  • Hi Sam,

    Thanks for your reply,i need changed value,old value and new value field data also, how can i get that, do have you any suggestion on this.

    Thanks,

    Shiva

    Thursday, September 1, 2016 9:49 AM
  • I don't think you can get the old and new values. CRM only stores the old values in the audit data (it derives the new values from the next audit record, or current record); these is stored in the changedata attribute, but this is marked as not ValidForRead, so I don't think you can read this via Fetch

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Thursday, September 1, 2016 12:45 PM
    Moderator