How to open a document window from Applescript

While doing some testing I wanted to open a document from Applescript, but couldn’t make it work. I tried:

open window for myItem

where myItem comes from

set theResults to search [search string which finds a document]
set myItem to first item of theResults

but I always got the Applescript error “DEVONthink 3 got an error: Some parameter is missing for open window for.

What do I miss?

What does the AppleScript dictionary say about the command you’re using?

The dictionary says

open window for

record record : The record to open.

Aaaaaaaah! I get it: record is not a direct parameter, but needs the keyword record.

Thanks for making me look more closely at the definition. (Trust me: I did look multiple times at the Dictionary entry, but oversaw that it is not a direct parameter.)

Yep. That is also similar when using commands like move, duplicate, etc.