Setting selected record?

I’ve written a script that merges the selected records (PDFs); when that succeeds, it sends the selected records to the trash. That part of my script works fine, but I want the script to exit with the newly-created record selected.

I’ve tried ```

set the selection to theNewRecord


Thanks in advance.

The selection property of a window is a list, so probably worth trying something like:


set the selection of front window to {theNewRecord}