Reporting user activity in CMS 12

Vote:
 

Hi 

I'm trying to use the features of EPiServer.DataAbstraction.Activities to build custom reports available through the CMS edit/admin UI and I need to be able to filter by the ActionType of the Activity logged in tblActivityLog (and / or use the netActvitiyLogList stored procedure). What I can't work out is where the Action value gets set. I've dug through decompiled libraries and looked through the database and cannot see any place the values are defined - not an enum in code or a table in the DB. I think I've hacked back to the values through the markup of the Change Log feature of the CMS admin area but I need to know I have the source of the values to be able to deliver the reports with confidence. Any ideas? Perhaps there's a better way than this? The users want more than can be got through the Change Log feature.

Thanks

Daniel Lack, developer

#342707
Jun 04, 2026 15:57
Vote:
 

Hi Daniel,

I’d probably try to go through the public activities API rather than taking the values from the Change Log markup. For content activities, I’d use ContentActionType and filter by both type and action:

var query = new ActivityQuery
{
    ActivityType = ActivityType.Content,
    Action = (int)ContentActionType.Publish
};

var activities = await activityQueryService.ListActivitiesAsync(query);

ActivityQuery.Action is documented as the action filter, and it is passed through to netActvitiyLogList as the action parameter, together with ActivityType as type.

So if you still need to call the stored procedure directly, I’d use the enum value rather than hard-coding values copied from the UI markup. I’d also keep the activity type in the filter, since the action value is tied to the activity type.

#342708
Edited, Jun 05, 2026 8:13
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.