I'm very new to Outsystems and have gone through the associate developer training. Now I am trying to create a small proof of concept application but I'm struggling with using server actions to create or update entity records.
I am successful with using the default CRUD actions that Outsystems creates but having those exposed as public is not a good practice. Is anyone aware of a tutorial that helps explain how to accomplish this via server action?
Hi!
You use your CRUD Actions, that can be public, and those actions use themselves the build in CRUDs.
this is an example.
Hope this help
Graça
Hi Josh,
You should create a business logic layer and all the request should pass there.
Front-End -> Business Logic -> Database
Regards,
João
Joao Luis Santos wrote:
I get that, I'm talking about how to actually set up the server action to update the record. For example, my Activity entity has a CreatedBy - User Identifier, CreateDate- Date, Status- Status Identifier
My server action would have an input parameter of type Activity and then I just pass those values along to the CreateorUpdateActivity that I pull into the server action I'm creating? I guess that's where I'm getting confused with how to actually pass the information along to the database. (hence asking if there are tutorials available anywhere)
Hi Josh Herron,
You can expose server actions that use entity actions, this will allow to change and modify them easily in future.
Maybe you want to see this post also:
https://www.outsystems.com/forums/discussion/35090/difference-between-the-entty-actions-and-server-actions/