How do I get all Kentico Object Types that log staging tasks?

Patrick Taylor asked on April 3, 2018 14:44

Is anyone here familiar with a way to get a summary of all Kentico Object types that log staging tasks on Create, Update, or Delete events? I'm open to Stored Procedure or Query approaches but am trying to implement this in the API. I'm guessing the [CMS_Class].[ClassName] value would be a starting point, but ClassSupportsVersioning doesn't seem to be an accurate indicator of whether or not a given class supports versioning. I also suspect it could relate to getting the LogChanges property from the TypeInfo of each Info Object, but I'm not sure how to query against all Info Object Types from the API.

Correct Answer

Trevor Fayas answered on April 3, 2018 16:56

Does this help?

foreach (DataClassInfo Class in DataClassInfoProvider.GetClasses())
        {
            if (Class.TypeInfo.SupportsVersioning)
            {

            }
            if (Class.TypeInfo.HasEvents())
            {

            }
            if(Class.TypeInfo.LogEvents)
            {

            }
        }
0 votesVote for this answer Unmark Correct answer

Recent Answers


Patrick Taylor answered on April 23, 2018 16:13

Thanks Trevor! I was trying to generically detect all TypeInfo Objects that generate staging tasks on Creates, Upates, or Deletes for a custom module UI designed to extend the staging functionality of Kentico. What I ended up doing though is deciding on an explicitly-defined set of related TypeInfo objects that are grouped under one heading such as Users, Roles, Orders, etc. This was a great help for getting me started down that path.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.