web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How is activitytypemask used/queried?

(0) ShareShare
ReportReport
Posted on by 3,079

So I know what activitytypemask is for - it's to specify whether an activity should be listed in the activity menus.  And that it cannot be changed after it's set (which means it cannot be turned off for system activities, very annoyingly).

I'm trying another hack at the problem I've seen a lot of people trying to address, which is how to hide unused system activity types.  By going through this and other forums/blogs, I figured out how to write a plugin that's registered on the retrievemultiple of savedquery, which can hide views based on whatever condition I specify.  Great.  So I put it to filter on "DO NOT USE", and started all the Fax views with "DO NOT USE".  So on the activities home page, it does not show those views.  BUT - because Fax has an ActivityTypeMask of 1, it still shows a View Subcategory of Fax - it just has nothing underneath it.

I figured okay, it's querying for which entities have this typemask flag set, and then going and getting all of the views from those.  So I just need to figure out where that query is happening, and intercept it as well.  So I turned on SQL Profiler, and loaded the Activity home page.  Not a single query is happening with ActivityTypeMask in it anywhere.  What's happening is that it's running the RetrieveMultiple query against the SavedQuery table individually for each TypeCode (when you click on that individual subcategory to expand it), rather than it being one query with the TypeCode as a parameter.  But I cannot find where it's coming up with that list of TypeCodes to query and create subcategories for in the first place.  Does anyone have any idea how this data is being read/used, if no db queries are hitting it?  I'm stumped.  I mean, I wonder if maybe it's related to the fact that you can't change it after it's set - maybe it's not *being* queried?  Doesn't make a lot of sense to me, but I just cannot track anything down on it.

*This post is locked for comments

I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans