Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

[Customer Guide] How to Reduce ActivityPointerBase

(9) ShareShare
ReportReport
Posted on by

     ! Important

This article contains steps on how to reduce the capacity consumption of ActivityPointerBase and ActivityPartyBase tables, which involve deleting custom data. Following deletion, these records will not be available anymore. Before proceeding with deleting any data in this table, please make sure to review your customizations, your workflows and plugins running on delete operations, and review cascade delete behaviors, in order to make sure that no data gets unintendedly deleted in the process. These actions should be tested first in a sandbox environment before proceeding with the final delete operation.

What is ActivityPointerBase?

The ActivityPointerBase table stores any activity or task that is performed by a user in Dynamics 365 CRM.

There are different types of activities that can be created whose links are stored in this table, along with the user and/or team associated to that activity, which is stored in ActivityPartyBase table. As such, when attempting to reduce the consumption of ActivityPointerBase, the consumption of ActivityPartyBase will also be reduced.

The following table lists the activity types which can be found in CRM (but not limited to):

  • Appointment
  • Approval
  • Booking Alert
  • Bulk Operation
  • Campaign Activity and Campaign Response
  • Case Resolution
  • Customer Voice Survey Invite and Response
  • Email
  • Fax
  • Incident Resolution
  • Untracked Email
  • Letter
  • Opportunity Close
  • Order Close
  • Phone Call
  • Quick Campaign
  • Quote Close
  • Recurring Appointment Master
  • Service Appointment
  • Social Activity
  • Task
  • Custom Activity Entities

Please bear in mind that this includes not just OOB activity entities, but also any custom activity entities that users may have created in Dynamics 365. 

How to retrieve the data from ActivityPointerBase

Using Advanced Find and Chart Capabilities

Through Advanced Find, you will be able to select the Activities entity and retrieve all the data that is present in this table; alternatively, you can also filter by Activity Type and Status, in order to get more streamed results.

1754.Screenshot_5F00_2.bmp

4162.Screenshot_5F00_3.bmp

Users can also leverage the Chart built-in functionalities to display activities records by activity type, in order to understand what records are occupying the most space in the table. This is accessible by going to Activities, change the view to All Activities (for example), select “Show Chart” and filter the Activities by Type:

2620.Screenshot_5F00_9.bmp

Example chart:

0250.Screenshot_5F00_1.bmp

Using SQL Management Studio

We can use SQL Management Studio to query online environment data, by establishing a connection to the database as per the below: 

8306.Screenshot_5F00_3.png

Example query: 

select ActivityTypeCodeName as 'Activity Name',
count(*) as 'Number of Records'
from [dbo].[activitypointer]
group by ActivityTypeCode, ActivityTypeCodeName
order by [Number of Records] desc

Example output: 

Screenshot_5F00_4.png

Through this query, the user will be able to understand the type of activities and the amount of rows each activity type currently holds. Based on these results, we can create bulk deletion jobs targeted to address a specific activity type.

If you wish to know more on how to leverage SQL to query your CRM online database, please review the following article: Use SQL to query CDS data.

How to Delete the Data

There are also two options to delete the data, depending on the size of the dataset – through Advanced Find or by running a Bulk Delete Job.

If you are looking to delete smaller datasets, the records can be deleted through the same window of Advanced Find. Select the records you wish to delete and choose “Delete Activity”.

Example:

6378.Screenshot_5F00_6.bmp

For larger datasets, the best option is to create a Bulk Delete Job targeting the specific entity type you wish to delete, such as Appointments, Letters, Phone Calls, Tasks.

Example:

4834.Screenshot_5F00_7.bmp

Through these steps, it will be possible to reduce the consumption of ActivityPointerBase.


See also

  • Arjan ter Heegde Profile Picture
    Arjan ter Heegde 37 on at
    RE: [Customer Guide] How to Reduce ActivityPointerBase

    Emails in Dataverse are now stored in blob storage! See my blog for more information:

    arjanterheegde.nl/.../

  • RE: [Customer Guide] How to Reduce ActivityPointerBase

    Have a look at www.d365-shrinky.com specifically to reduce the size of embedded images in the description field.  In most cases a dramatic reduction in size, but no data loss for the end user.  Info@d365-shrinky.com 

  • gcor27 Profile Picture
    gcor27 on at
    RE: [Customer Guide] How to Reduce ActivityPointerBase

    Caroline, your write up continues to yield benefit 2 years on. Thank you.

    Do you or anyone know the impact of deleting the data in the ActivityPointBase table?  Will it remove the activity descriptions in this table or delete the actual activity entities themselves so they cannot be found in the database.  My partner is in Health Care and need to store the activity information for regulatory compliance purposes, such as responding to a complaint by a patient.  They need to retrieve the original email "as sent".

  • Alex-Pinkis Profile Picture
    Alex-Pinkis on at
    RE: [Customer Guide] How to Reduce ActivityPointerBase

    Thanks for this great piece of information about this table Carol, I've shared it many times.

    Kudos Carol.

  • carlf Profile Picture
    carlf 20 on at
    RE: [Customer Guide] How to Reduce ActivityPointerBase

    Thanks!!! I didn't realize I could actually connect to the SQL DB for our CRM! Amazing!! (Even though is read only)

  • Slav Mitrev Profile Picture
    Slav Mitrev on at
    RE: [Customer Guide] How to Reduce ActivityPointerBase

    Big Thank you Caro for adding all related information in one article !

  • yader.morales Profile Picture
    yader.morales 282 on at
    RE: [Customer Guide] How to Reduce ActivityPointerBase

    Awesome content Carolina!!! Thanks for sharing!!

  • LuHao Profile Picture
    LuHao 40,874 on at
    RE: [Customer Guide] How to Reduce ActivityPointerBase

    Hi Carolina,

    Great content. Thanks for sharing.

    I would recommend you to apply for a blog so that you can share more wonderful articles more conveniently.

    community.dynamics.com/.../136.request-a-new-blog-or-blog-to-syndicate

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,791 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,488 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans