how to use Update Action

how to use Update Action

  

Hello guys,

I need with this Action update DetailFeedback.Confirm to False where is DetailFeedback.Confirm is true and where the other 2 parameters are satisfy ( site and date)

How is possible?

Later .. I need another Action where Delete FROM DetailFeedback  records where DetailFeedback.Confirm = true and DetailFeedback.SiteDescr = SiteDescr2

@SiteDescr2 is my local Variable

Please help me

Hello Manuela,

The update needs a record of the same type of the entity you are trying to update. It will use the ID in that record to find it in database, so you need to set it.

Typically we use the Form.Record, change the values we want to change and update it, or we use an aggregated filtered by the ID, change the values in the aggregate's list.current and pass it to the update.

To delete a record you can do the same, find the record with an aggregate and use the delete action entity with the id of the record found.

Cheers.

Hi Manuela.

Just to add a point to Eduardo's answer, if this is something that you'll do for a certain amount of records, you could use an Advanced Query instead and write your update SQL statement and run all under the same transaction and avoiding multiple calls of you Update Action.

The same pattern can be used for the Delete statement.

Cheers,

GM

Hi Emanuela,


I recommend you, to see all tutoriais Becoming a Web Developer and see documentation about update action... It is easier for you :)

Paulo Cação wrote:

Hi Emanuela,


I recommend you, to see all tutoriais Becoming a Web Developer and see documentation about update action... It is easier for you :)

I did.

But this matterfits with my project  I didn't find.