26
Views
2
Comments
Update of a record from a database

Hi, 


updating a record from a database entity can be done from a client action, although not directly from a client action? or can only be done by a server action?


thank you in advance!

Rank: #633

Hi,

it depends on.

If You are working with a mobile app and Local Storage Entities, you can use the Client Actions to update the record.

Or it could also be an action that is initially called Client Side, but within that action you should call a Serer Action to Update de Record in Database.

But, In any other scenario, the answer is only in Server Actions.  

Regards,

James

Rank: #143

Hi Corina,

There are 2 different types of entities in OutSystems Applications:

  • Local Storage Database Entities
  • Server Database Entities


Local Storage Database Entities can be used in Mobile Applications. They allow you to store data in the device and they are totally managed in the client-side. This means that you can only update a record from these entities using client actions.

Server Database Entities are the regular entities that are created in the database server to support your OutSystems application. They allow you to store data in the serverand they are managed in the server-side. This means that you can only update a record from these entities using a server action.

However it is important to mention that client actions can call server actions (and the opposite is not possible). This means that you can execute a client action and (in its flow) call a server action in order to update a record from a server database entity. But you will always need a server action to do that.


Hope that this helps you.


Kind regards,

Rui Barradas