locked
Duplicate entries in Sales report RRS feed

  • Question

  • Sorry if there is a simple answer to this but I am just starting to learn CRM.

    I am using CRM online and have created a custom sales pipeline report. All worked fine until users started adding more notes to an opportunity. The report now shows multiple entries for the same opportunity for however many notes have been added.

    For example and opportunity that has one note added appears in the report once where as an opportunity that has 3 notes added appears in the pipleline report 3 separate times with each note.

    What I would like to happen is that the report shows the opportunity once with the latest note.

    Wednesday, August 6, 2014 10:08 AM

All replies

  • Hi Alan,

    Try by creating two reports. One for opportunity data(Main Report) and second is for note date(Sub Report). Add the below query to note(Sub Report) and call this note(Sub Report) to opportunity(Main Report). 

    Set count ="1" in your fetchxml and also make sure there is order by descending="true" for attribte createdon for note.

    this will give you the latest recore of note.. 

    something like below..

    <fetch distinct="false" no-lock="false" count="1" mapping="logical">
    <entity name="annotation" prefilterparametername="CRM_filteredannotation">
    <attribute name="subject" alias="subject" />
    <attribute name="createdon" alias="createdon" />
    <attribute name="annotationid" />
    <order attribute="createdon" descending="true" />
    <link-entity name="opportunity" from="opportunityid" to="objectid" alias="ab">
    <filter type="and">
    <condition attribute="opportunityid" operator="eq" uitype="opportunity" value="@parameteropportunityd"  />
    </filter>
    </link-entity>
    </entity></fetch>



    • Edited by Suresh Sorde Wednesday, August 6, 2014 1:43 PM
    • Proposed as answer by Suresh Sorde Wednesday, August 6, 2014 1:43 PM
    Wednesday, August 6, 2014 10:41 AM
  • Thanks for this. But the problem is I am a complete newbie to CRM so wouldn't even know where to start trying to put this query into a report. Any guidelines available you know of.
    Friday, August 8, 2014 1:37 PM
  • Hi Alan,

    Check this..

    http://h30507.www3.hp.com/t5/Applications-Services-Blog/Microsoft-Dynamics-CRM-2013-SSRS-drill-down-reports-Part-I/ba-p/148797

    http://blogs.msdn.com/b/crm/archive/2010/10/26/how-to-creating-custom-report-with-microsoft-dynamics-crm-2011-bids-fetch-extension.aspx

    http://www.microsoft.com/en-us/dynamics/crm-customer-center/create-edit-or-copy-a-report-using-the-report-wizard.aspx

    Friday, August 8, 2014 2:43 PM