Skip to main content
September 15, 2023
Question

Problem trying to delete Data

  • September 15, 2023
  • 3 replies
  • 0 views

Hi! I have created two different Records (R1, R2). In my site, I have a summary view of R1, which shows some info + a Read-Only Grid of R2 (filtered by R1 primary key)

Besides I have a related action (of R1) to delete the records of R1

My problem here is that, when I try to delete R1 I have faced different "errors" among the time:

A) nothing happens

B) an error appears (not able to delete)

C) It deletes the summary view and the R1 field, but NOT the R2 fields

Something similar occurs when I try to update records

So, which recommendations would you give me in order to be able to delete/update two different records at the same time? I would like to hear the best practices. I was thinking about re-making each process model (delete-update) and add a delete/update records of R2 in each case. Would this be a good approach?

Thanks a lot!

    3 replies

    September 15, 2023

    Hello! I want to know what does Delete mean here. Do you actually delete an entry or just toggle a Boolean field which helps in controlling the visibility?

    September 15, 2023

    Hi Mandark! With delete, I mean to delete the entry of the associated records (in my case, R1 and R2 entries)

    September 18, 2023

    Hi Carlos! I would not recommend to completely delete the entry from the database except for certain scenarios eg - temp data which is not required to be audited. Instead you may add a column to the record - 'isActive' of boolean data type and set the value to False whenever you wish to delete the data.

    For grids where you wish to display the records (be it R1 or R2) add a source filter for active records only (isActive = true). 

    In your case, you can configure the process model of related action of R1 to update the column 'isActive' of R1 and R2 to false. I hope this helps. Let me know if you have any further queries on this.