0

I known this a broad question, I just cant get my head around it. I have created a report that pulls client details for a specific sales person. I get back clients with addresses and some without addresses , even though the address composite field has been filled out on CRM. There is no equation/expression that I have used to pull the address date. Just get the field and display. Can you help me , by giving me a few pointers on what to check/look out for in CRM .

UPDATE 1:

<fetch distinct="false" no-lock="false" mapping="logical">
<entity name="activitypointer" enableprefiltering="1" prefilterparametername="CRM_FilteredActivityPointer">
    <attribute name="scheduledstart" alias="scheduledstart" />
    <attribute name="subject" alias="subject" />
    <attribute name="regardingobjectid" alias="regardingobjectid" />
    <attribute name="description" alias="description" />
    <attribute name="activityid" />
    <attribute name="ownerid" alias="ownerid" />
    <attribute name="activitytypecode" />
    <attribute name="actualstart" alias="actualstart" />
    <attribute name="actualdurationminutes" alias="actualdurationminutes" />
    <attribute name="actualend" alias="actualend" />
    <link-entity name="opportunity" to="regardingobjectid" from="opportunityid" link-type="outer" alias="LE_3c8631e7bcbe64b3de96e66789a47536">
        <attribute name="customerid" alias="LE_3c8631e7bcbe64b3de96e66789a47536_customerid" />
        <attribute name="schedulefollowup_qualify" alias="LE_ad91c354eb5a26b004de4d41b2c3d454_schedulefollowup_qualify" />
        <attribute name="new_accounttype" alias="LE_54d761d89ac278139a6836de7c3607db_new_accounttype" />
        <attribute name="new_neworexisiting" alias="LE_5db2d6da9e43bd44c8949cb912432cba_new_neworexisiting" />
        <attribute name="new_accaddresscomposite" alias="LE_c6b3b5d2a9364c90878a5d147b97b866_new_accaddresscomposite" />
        <attribute name="parentaccountid" alias="LE_b7d5c9432034544323d9170db9688778_parentaccountid" />
        <attribute name="actualclosedate" alias="LE_3d1bcadc4e9010d6d4689ded2531d68a_actualclosedate" />
    </link-entity>
    <link-entity name="account" to="regardingobjectid" from="accountid" link-type="outer" alias="LE_d08b5ac0b1b1a422353a6d092b699986">
        <attribute name="name" alias="LE_d08b5ac0b1b1a422353a6d092b699986_name" />
    </link-entity>
    <link-entity name="account" to="regardingobjectid" from="accountid" link-type="outer" alias="LE_b6831392115770835cce64e99a59be4a">
        <attribute name="address1_composite" alias="LE_b6831392115770835cce64e99a59be4a_address1_composite" />
    </link-entity>
        <link-entity name="new_visit" to="regardingobjectid" from="new_visitid" link-type="outer" alias="LE_041a4de02adecc6816a3be5b9389d9ac">
        <attribute name="new_tmpdurationmins" alias="LE_041a4de02adecc6816a3be5b9389d9ac_new_tmpdurationmins" />
    </link-entity>
    <link-entity name="new_visit" to="regardingobjectid" from="new_visitid" link-type="outer" alias="LE_0238625bc02c72e091b42d4c6ece34e5">
        <attribute name="new_arriveddatetime" alias="LE_0238625bc02c72e091b42d4c6ece34e5_new_arriveddatetime" />
    </link-entity>
</entity>

AndroidAL
  • 1,111
  • 4
  • 15
  • 35
  • Could you add the FetchXml query for your DataSet? It's hard to tell without seeing any fields, filters and joins. – Filburt Jun 02 '15 at 16:45
  • @Filburt , added start of xml. – AndroidAL Jun 02 '15 at 16:59
  • I suspect the problem arises from the way your account fields are linked to your activitypointer. I'll have to fiddle a little with FetchXmTester (great Tool btw.) before I can post an answer. – Filburt Jun 02 '15 at 18:03

1 Answers1

0

As a first tweak I'd suggest you merge those separate link-entity joins on account into one:

current joins on account:

<link-entity name="account" to="regardingobjectid" from="accountid" link-type="outer" alias="LE_d08b5ac0b1b1a422353a6d092b699986">
  <attribute name="name" alias="LE_d08b5ac0b1b1a422353a6d092b699986_name" />
</link-entity>
<link-entity name="account" to="regardingobjectid" from="accountid" link-type="outer" alias="LE_b6831392115770835cce64e99a59be4a">
  <attribute name="address1_composite" alias="LE_b6831392115770835cce64e99a59be4a_address1_composite" />
</link-entity>

proposed change:

<link-entity name="account" to="regardingobjectid" from="accountid" link-type="outer" alias="LE_d08b5ac0b1b1a422353a6d092b699986">
  <attribute name="name" alias="LE_d08b5ac0b1b1a422353a6d092b699986_name" />
  <!-- move the address1_composite field here -->
  <attribute name="address1_composite" alias="LE_d08b5ac0b1b1a422353a6d092b699986_composite" />
</link-entity>

This should at least yield a consistent behavior for all account fields but it still leaves open if using activitypointer as the root entity for your report is the right way. It depends on your reports business logic/user story.

You could verify this by formulating the report in plain language: "For all Activities, show me ..." vs. "For all Opportunities, show me ..." vs. "For all Accounts, show me ..."

A great way to test your reports FetchXml query is using FetchXmlTester contained in Xrm Toolbox.

Filburt
  • 17,626
  • 12
  • 64
  • 115
  • Many Thanks, I have made the change in xml, What would you change activitypointer too?. – AndroidAL Jun 03 '15 at 08:54
  • Depending on how you would formulate your report in plain language, I would choose the according Entity as the root of your query. If you main focus is indeed only existing activities - which will exclude Opportunities and Accounts currently not related to any activity - your query is fine as it is now. – Filburt Jun 03 '15 at 09:15
  • Thanks again, Could you provide me with an example of what you mean, please. – AndroidAL Jun 03 '15 at 10:07