New Feature: Before Collection Entity Behaviour
Posted February 2nd, 2023
New Feature: Before Collection Entity Behaviour
Posted February 2nd, 2023
Note: This feature was released with version 3.3.73 of the OMNIA Platform
Today we introduce a new development feature, in the form of a new Behaviour!
The new “Before Collection Entity Behaviour” is applied only to Entities that have a collection as a property and is triggered when an entry is added/initialized on a collection.
This new behaviour receives one parameter, called “entry”, representing the new entity added, like this:
void BeforeCollectionEntityInitialize(Entity entry)
{
}
This new behaviour doesn’t replace any existent one, it only adds to the entire OMNIA Platform’ flow, as represented below:
As you can see, there were some changes, with this new “Before Collection Entity Initialize” behaviour occurring right after the “Initializer” and before the “Before Change”.
Until now, to set a default value to a collection property it was required to implement an “Action/Change Behaviour” in the entity in order for it to trigger when a change happens and then use a “ForEach” loop through the collection entries, like this:
Collection.ForEach(line => {
line.description = "This is inefficient";
});
line.description = "OMNIA ROCKS";
Platform Update and Documentation
This new feature is part of our 3.3.73 version of the platform, released today.