23
Views
3
Comments
Solved
Input parameters in Events
Application Type
Reactive

I have an event called "EntityCreated", which is triggered whenever a new record is created. When this happens, I need to send an email notification to the user containing all the relevant information about the entity.

I'm considering two approaches:

1. Pass only the EntityId to the event

2. Pass the full entity structure to the event

Which solution is better?

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi Lukasz,

According to OutSystems best practices, always fetch only the fields you need from the database and to not pass records as Inputs, to avoid passing redundant information and large records.

Define specific structures with just the required attributes, rather than returning entire entities as I/O parameters, so the platform can optimize queries and improve performance.  

2025-01-23 09-22-22
ABHIJITH G
Champion
Solution

Hi @Łukasz Kaproń ,

Instead of using the parameter of the entity structure, use a new structure with attributes relevant to the email that you have to notify. This will be one of the best approaches

Thanks

2023-06-13 12-29-43
Sakthivel P
Solution

Hi @Łukasz Kaproń,

Pass only the EntityId is generally the better approach. If the structure of the entity changes, the event handler doesn't necessarily need to change (as it fetches the latest data itself).

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi Lukasz,

According to OutSystems best practices, always fetch only the fields you need from the database and to not pass records as Inputs, to avoid passing redundant information and large records.

Define specific structures with just the required attributes, rather than returning entire entities as I/O parameters, so the platform can optimize queries and improve performance.  

2025-01-23 09-22-22
ABHIJITH G
Champion
Solution

Hi @Łukasz Kaproń ,

Instead of using the parameter of the entity structure, use a new structure with attributes relevant to the email that you have to notify. This will be one of the best approaches

Thanks

2023-06-13 12-29-43
Sakthivel P
Solution

Hi @Łukasz Kaproń,

Pass only the EntityId is generally the better approach. If the structure of the entity changes, the event handler doesn't necessarily need to change (as it fetches the latest data itself).

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.