Enterprise Application Development

Fast Modeling, Responsive Design, One-Button Deploy

BOOK a Demo

Economic theory-based business modeling

Resources, Events, Agents

BOOK a Demo

Collection Entity Initialize Behaviour: all you need to know
Posted February 6th, 2023

Collection Entity Initialize Behaviour: all you need to know
Posted February 6th, 2023

Note: This feature was released with version 3.3.73 of the OMNIA Platform

One of the most productive ways one can handle customer support is by not simply fixing bugs, but also listening and understanding how the needs of our users can greatly help us improve OMNIA’s development experience.

Today we bring you a perfect example of this, in the form of a new way to develop applications using our latest behaviour and demonstrating it with the classic “Purchase Order” example. 

If you have been developing with OMNIA, you know that in a master-detail scenario, you need to propagate the attribute value of an entity to the collection’s entities. Cases like copying an Expense Report Employee from a Document to the Commitment Provider attribute or copying the Order Company to Events and Commitments are quite common.
To solve that you would use an AfterChange behaviour that would iterate over the collections copying the values, that would look something like this:
As you know, this is not the most efficient thing to do. This way, an After Change will execute in every single interaction with the entity, so the data will be copied to the collections even when nothing relevant has changed. Just imagine your collection has 50 lines, or 500. It’s a lot of unnecessary processing.
Being aware of this, we came up with new behaviour to execute before a collection entry initialize. We called it  “Before Collection Entity Initialize“, a very catchy name 🤓
This new behaviour will enable you to achieve a new level of efficiency.
Why? Because now you can set the attribute value in the collection only when a new entry is defined. Here’s what your code will look like now:
If, in your scenario, the parent attribute can be changed by the user, you can apply the change in the On Change behaviour of the parent attribute.
Here’s our official documentation page, if you want to see all the information about this new behaviour.

We hope you’ve enjoyed this new and improved way of developing with OMNIA, if you have any suggestion feel free to let us know, feedback is, as this new feature helps demonstrate, always welcome.

If you still don’t have this feature and want to start using it, remember to update your OMNIA platform to version.

Platform Update and Documentation

This new feature is part of our 3.3.73 version of the platform.


📄 Documentation

✉ Signup for our Newsletter to get our weekly news