Problem trying to delete Data

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!

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to carlosp5114

    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.

Children
No Data