This is the 2nd similar report concerning the JXA version of this method. I suppose that there’s some glitch somewhere, @cgrunenberg would have to assess.
According to the scripting dictionary, your call looks ok.
I suggest that you use const
whenever possible instead of let
and var
, though. That prevents involuntary modification of values and leaking of variables into the global scope (where they don’t belong).
Edit: Running the script in Script Editor shows these messages
app = Application("DEVONthink 3")
app.getRecordWithUuid("1626AE02-7B82-4404-8074-8683B71A69BE")
app.summarizeHighlightsOf({records:[], to:"markdown"})
So, obviously, the records
list passed onto DT’s guts is empty. Which it shouldn’t be.