How to know item/FQID of User-Defined / Manual Event?

Hi,

I’m developing an integration of a custon AVL app with XProtect Corporate. I’ve been looking at the saple provided in other posts (ComponentSamples/ConfigAccessViaSDK) and successfully created the event/rule set in Management Client.

The question is if there is a more accurate way of getting the FQID of the newly created event other than traversing recursively the entire items tree?

You can ask for them in several ways:

Configuration.Instance.GetItemsByKind(Kind.TriggerEvent, ItemHierarchy.SystemDefined)

  • This give a top node, where you need to perform a GetChildren call as long as the item has FolderType!=FolderType.No

or

Configuration.Instance.GetItemsBySearch(Kind.TriggerEvent.ToString(), … )

Here you retrieve a flat list - but it includes folders as well that you need to weed out.

Thank you Anders, it worked perfect using this method:

Configuration.Instance.GetItemsBySearch(Kind.TriggerEvent.ToString(), … )