471
Views
7
Comments
Delete and Update in Outsystems
Question

Assalamu'laiakum.

I'm Fahmi.

When i want to update and delete data, should i have to advanced sql ? or just make the run server action ?

I'm newbie here, so plese help me haha.

Thanks

2017-07-15 18-41-36
Sachin Mahawar

fahmi fachrurozi wrote:

Assalamu'laiakum.

I'm Fahmi.

When i want to update and delete data, should i have to advanced sql ? or just make the run server action ?

I'm newbie here, so plese help me haha.

Thanks

Hi Fahmi,

Both ways are fine, If you want to delete or update more than one record at a time based on your condition than Advance Sql can be use. Otherwise you can use Sever action to delete or update single record at a time.

Sachin


2017-09-26 04-22-30
fahmi fachrurozi

Sachin Mahawar wrote:

fahmi fachrurozi wrote:

Assalamu'laiakum.

I'm Fahmi.

When i want to update and delete data, should i have to advanced sql ? or just make the run server action ?

I'm newbie here, so plese help me haha.

Thanks

Hi Fahmi,

Both ways are fine, If you want to delete or update more than one record at a time based on your condition than Advance Sql can be use. Otherwise you can use Sever action to delete or update single record at a time.

Sachin


The possibility record that could be deleted or updated in Profile Entity are Username, Photo, And Password. So i have to use Advanced SQL or just RunServer Action ?


2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi Fahmi,

If you need to update some/all attributes of a single entity record (like changing the Username of a Profile entity record you suggest) then you will most likely want to use the UpdateProfile Entity Action to do it.

The same if you have the Id of the record you want to delete, just use the DeleteProfile Entity Action.

What Sachin was mentioning is if you need to update/delete multiple records/rows based on some condition (e.g. delete all Log entities whose Timestamp attribute is older than two weeks) then you're probably better off with using a SQL statement.

2017-09-26 04-22-30
fahmi fachrurozi

Jorge Martins wrote:

Hi Fahmi,

If you need to update some/all attributes of a single entity record (like changing the Username of a Profile entity record you suggest) then you will most likely want to use the UpdateProfile Entity Action to do it.

The same if you have the Id of the record you want to delete, just use the DeleteProfile Entity Action.

What Sachin was mentioning is if you need to update/delete multiple records/rows based on some condition (e.g. delete all Log entities whose Timestamp attribute is older than two weeks) then you're probably better off with using a SQL statement.


Allright man, i got it. Thanks :)

2023-09-06 11-31-56
Hitesh Maran

Hi Fahmi,

I am agree with Sachin.For delete you should look into entity. What type of delete rule you have applied.

-HM-

2017-09-26 04-22-30
fahmi fachrurozi

Hitesh Maran wrote:

Hi Fahmi,

I am agree with Sachin.For delete you should look into entity. What type of delete rule you have applied.

-HM-

Ok Hitesh, thanks


2019-09-24 18-41-25
Jorge Martins
 
MVP

Fahmi,

If one of the answers solves your issue please mark it as solution. If none does but you managed to figure out how to solve it, please share with the community as well and mark it as the solution, this way you'll help others that may have the same doubt.

Thanks!

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