Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)
Under review by Community Managers

Under review

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

[Customer Guide] How to Reduce ActivityPointerBase

Posted on by

Customer Guide - How to Reduce ActivityPointerBase

? 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

1. 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.

7532.Screenshot_5F00_2.bmp

8267.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:

7612.Screenshot_5F00_9.bmp

Example chart:

2235.Screenshot_5F00_1.bmp

2. Using SQL Management Studio

We can use SQL Management Studio to query our online environment data, by establishing a connection to the database as per the below (make sure the TDS endpoint setting is enabled in the environment settings in the Power Platform Admin Center):

1070.Screenshot_5F00_4.bmp

Example query:

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

Example output:

8345.Screenshot_5F00_5.bmp

Through this query, the user will be able to understand the type of activities and the amount of records each activity type currently has. 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:

4478.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:

4621.Screenshot_5F00_7.bmp

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


See also

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans