Automatic CRUD wrapper generation

A CRUD wrapper is an essential tool that enhances the default Entity Actions in OutSystems. By “wrapping” actions like GetProduct, CreateProduct, UpdateProduct, and DeleteProduct, it allows you to incorporate additional logic before and after accessing or modifying records. While the “R” in “CRUD” stands for “Read,” the focus of wrapping is more on the Create, Update, and Delete actions.

Having a CRUD wrapper in your OutSystems application offers numerous advantages. While the platform allows you to quickly build apps with its drag-and-drop features, as your app scales, you’ll encounter challenges like maintaining multiple places that modify a record’s value and implementing validation logic. Additionally, handling translations when messages are scattered throughout the app becomes cumbersome. Moreover, when advanced logic needs to be integrated, such as setting default values or interacting with external services, managing it across the app can be difficult. The presence of a CRUD wrapper provides a centralised location to handle all entity-related logic, ensuring consistency throughout the application.

The CRUD wrapper empowers you to streamline development, improve maintenance, and enhance overall efficiency. It eliminates the risk of overlooking important details such as the IsActive Attribute when applying a soft delete pattern. By leveraging the CRUD wrapper, you can enforce standardised practices and simplify the development process, making OutSystems an indispensable platform for enterprise-grade applications.

How to generate an Automatic CRUD wrapper

In this video, OutSystems Developer Charles Visita demonstrates how to generate an Automatic CRUD wrapper. Watch as he walks through the process of creating a wrapper for a create or update action, adding validation, and saving data. 

Want to learn more valuable Dev Tips? Sign up for our newsletter and stay updated with the latest insights! Also, don’t forget to check out our upcoming OutSystems courses to scale your career.

A selection from our recent work