Running scripts on individual records displayed via portals
I have a parent-child record based system where researchers refine records into clusters, which are essentially groups of records. These groups are tracked on a parent-child join table. I have it set up where a single "cluster" record displays information from the parent records. I would like my users to be able to remove an individual parent-child record on the join table. I am not certain how I can do this with records displayed via a portal, however.
For instance, say record ids 7, 8, and 9 were used to create the new child record, 25. When viewing record 25 (through a new layout I have created for child-level records), a portal to records 7, 8, and 9 is displayed so users know what records were used to create the child record. If a user decides record 7 should no longer be a parent, there is no way for them to easily remove this relationship. How would I go about making this happen?