1284
Views
4
Comments
Solved
Using server action to create entity records
Question

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?

2018-06-05 16-54-03
Maria da Graça Peixoto
Solution

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

UserImage.jpg
Joao Santos

Hi Josh,

You should create a business logic layer and all the request should pass there.

Front-End -> Business Logic -> Database

Regards,

João

UserImage.jpg
Josh Herron

Joao Luis Santos wrote:

Hi Josh,

You should create a business logic layer and all the request should pass there.

Front-End -> Business Logic -> Database

Regards,

João

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)



2023-07-28 17-00-32
Marco Arede
 
MVP

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/

Regards,

2018-06-05 16-54-03
Maria da Graça Peixoto
Solution

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

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