Can We Loop Through Original Detail Records, Including Deleted Details?

I’ve been able to do this with a subtable on a Standard application. I can obviously fetch a singular original detail record, but it doesn’t seem like we heave the ability to loop all original detail records, including the deleted ones. Please let me know if you have any ideas!

There’s no way to loop a Fetch Original because it’s inherently tied to a record’s nwId and is guaranteed to be unique. I think your best bet will be to perform that Fetch Original Record within a loop over all details of your HD. This can be a separate loop or an existing one depending on your use case and needed filter criteria.

Your note on records with a disposition of Deleted shouldn’t be a concern: if you have an nwId and perform a Fetch Original. it will return the live version of the record regardless of what action you have taken against that record in your NATE container[1], so details with any disposition other than Inserted will yield a successful fetch.


  1. Reminder that Fetch Original only works correctly in the context of a NATE container. If your process has the potential to run outside of NATE, Fetch Original will return the live record, which means you’ll get the current and live version if it hasn’t been modified during this transaction or you’ll get the version that exists in your transaction, including uncommitted changes. ↩︎

1 Like

I agree, performing a Fetch Original Record inside a standard Fetch Record would normally be the ideal solution. I should have mentioned that my specific scenario occurs during the Save of an HD record, which means a standard Fetch Record will not return details with a disposition of Deleted.

Because of that limitation, I’ve used a different approach. I have two records in a many-to-many relationship that need to stay synchronized. If a user adds Record 2 to Record 1’s subtable, Record 2’s detail is updated with Record 1, and vice versa, including deletes.

Record 1 uses a subtable, allowing me to loop the original subtable during Save. On Record 2, instead of using the default delete button on the detail, I’m using a Row Action. This lets me run a Logic Block with a Link Type of “Not in Transaction Boundary (Save Required)”, ensuring the user must save the HD before the change is committed to the associated record.

1 Like