Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

Need to see all accounts with any activity

Posted on by Microsoft Employee

I am looking for a way to create a view (account level) or report that would display any account that had any activity - either at the account level or a contact associated with the account.

I can create views with activity at the Account (Regarding) level and views with the Contact level. But I can't do both and really need to be able to get this listing together.

Categories:
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to see all accounts with any activity

    Thank you! I knew there had to be a way - this is exactly what I was looking for!

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to see all accounts with any activity

    Hi,

    You can get the view through "Marketing List" which is very simple.

    Create a marketing list.

    Marketing -> Marketing List -> New

    Select List type as "static" and Targeted at as "Account". Click "Manage Members" and select "Add members using advanced find" option.

    add-members-1.png

    In the Add Members dialog box, select "activity parties" and click "find".

    add-members-1.png

    You will get a list. Select the option "Add all the members returned by the search to the marketing list" and click "Add to Marketing List".

    Now again click "Manage Members" and select "Add members using advanced find" option. In the Add Members dialog box, select "Contacts (Company Name)"and below that select "Activity Parties". Now click "find".

    add-members-2.png

    Select the option "Add all the members returned by the search to the marketing list" and click "Add to Marketing List".

    PS : This view works only in the Marketing List.

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,473 on at
    RE: Need to see all accounts with any activity

    Hi,

      if you are ok with an SSRS report, you can use this kind of fetchXml:

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
      <entity name="account">
        <all-attributes />
        <order attribute="name" descending="false" />
        <filter type="or">
          <condition attribute="activityid" entityname="activity1" operator="not-null"  />
          <condition attribute="activityid" entityname="activity2" operator="not-null"  />
    
         </filter>
        <link-entity name="activitypointer" from="regardingobjectid" to="accountid" alias="activity1" link-type="outer">
        </link-entity>
        <link-entity name="contact" from="parentcustomerid" to="accountid" alias="contact" link-type="outer">
          <link-entity name="activitypointer" from="regardingobjectid" to="contactid" alias="activity2" link-type="outer">
          </link-entity>
        </link-entity>
      </entity>
    </fetch>

    There are a bit more details on how this fetch works here:

    http://www.itaintboring.com/dynamics-crm/two-most-ignored-features-of-fetchxml/

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to see all accounts with any activity

    Clarifying my request:

    So, I have the following data:

    • An account ABC, with an activity with "Regarding" set to Account ABC.
    • An account DEF with no activity that is "Regarding" Account DEF
    • A Contact associated with account DEF who has an activity "Regarding" said Contact

    On my "view" or "report" or "listing", I want to be able to have an Account level report that lists both ABC and DEF.

    This is how the Account Summary default view displays activities. But doesn't seem to be a way to get ALL Accounts listed that have EITHER Account level OR Contact level data.

    That is what I am looking to address.

  • Suggested answer
    Priyesh Profile Picture
    Priyesh 7,363 User Group Leader on at
    RE: Need to see all accounts with any activity

    Hi,

    You need to query on Accounts. And then select the related records. as follows:

    advfind.png

    And then under that select Activity contains data. So the final query will look like this:

    advfind.png

    And you'll get results - Accounts that have some Activity under them i.e. The Accounts which are set as Regarding field in those Activities.


    Hope this was helpful. If yes, kindly mark my answer as verified.

    Thanks.

  • Aric Levin Profile Picture
    Aric Levin 30,184 on at
    RE: Need to see all accounts with any activity

    If you go to Advanced Find, and do a on the Account Entity, you can select the Activities (Regarding) as the related entity, and put in there something such as Regarding field Contains Data. This will basically give you all Accounts that have Activities.

    Follow the same logic for the Contact entity, and save the views.

    Example:

    Look for: Accounts

    Query:

    Status Equals Active

    Activities (Regarding) ==>

     Regarding Contains Data

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans