CustomSubEntityManager provides many methods for retrieving custom sub-entity rows. All of the methods return the data as a CustomEntityList. CustomEntityList is a generic class where the type is the same type as the CustomSubEntityManager’s template type.
For example, if the CustomSubEntityManager type is CustomSubEntity, then the get methods will return a CustomEntityList<CustomSubEntity> (a CustomEntityList of the type CustomSubEntity).
If you specified your own type when getting the CustomSubEntityManager, then the CustomEntityList will be of that type and return rows as that object type.
GetCustomEntities is the method that will return all the rows of a particular custom sub-entity. The rows returned will be secured by the cascading security model. You will only get rows back where the logged in user has access to at least one of the parent records and rows that are public or rows that are private to that user.
Just like Contacts, Groups, and Companies, custom sub-entity lists have a tagged collection and you can tag records for retrieval. CustomSubEntityManager has a method called GetTaggedCustomEntities that returns a CustomEntityList of the records that are in the tagged collection of the passed in list.
GetCustomEntitiesByID can be used to retrieve custom sub-entities by their primary key. This will only return rows that the logged in user has access to. CustomSubEntityManager provides the GetCustomSubEntities method to retrieve all the custom sub-entity rows for a particular parent record. There are overloads that take Contact, Group, and Company.
CustomEntityList derives from DataList just like other list classes in the Act! framework. For example, ContactList. The only difference is that CustomEntityList derives from the DataList<T> template class so it can provide a strongly typed list.
Like other DataList classes, CustomEntityList provides the same functionality just for custom entities. If you have used ContactList, GroupList or CompanyList you should find the CustomEntityList has the same interface.
CustomEntityList has a field descriptor collection for choosing which fields are displayed when the list is data bound to a component that supports ITypedList. The CustomSubEntity property is called FieldDescriptors. Add CustomEntityFieldDescriptor objects to the FieldDescriptors property to have those fields show in a data bound list control.
Once you have retrieved a CustomEntityList you can use the indexer to retrieve a particular CustomSubEntity row.
The type returned from the indexer is the generic type of the CustomEntityList. For example, if you have a CustomEntityList<Account> then the indexer will return an Account object.
Just like other DataList classes, CustomEntityList supports IList, IBindingList and ITypedList interfaces so it can be used with data binding.