Let me begin by applogizing for the complexity of my answer to your question. You have stumbled into one of the more confusing and complicated areas of AppleScript.
The problem is that the term plain text has multiple meanings. AppleScript considers this term to be a data type and a synonym for the string data type. DEVONthink is using the term plain text to refer to a property within it’s content object - an unfortunate choice by the application’s developer.
The Expressions area of the Script Debugger script window evaluates all expressions in the default AppleScript context where plain text is a data type. You’ll notice that AppleScript has changed plain text to string in the error message shown.
You can make the context explicit by using the expression tell app "DEVONthink" to get plain text of myRec.
Another approach may be to do these evaluations in-line in your script:
tell application "DEVONthink"
set myRec to ... -- the expression use used to locate the content object instance
plain text of myRec --> content of the property
You can then single-step through these statements to see the results.
I’ve run into syntax collisions in other contexts as well. The example below shows another workaround method, in this case to resolve a conflict between AppleScript’s and Adobe Illustrator’s name property. The command requires Illustrator’s «property bAl9» version of name, but AppleScript usurps and changes it to its own «property pnam» version of name.
-- get list of artboards
-- keep 'name' «property bAl9» from changing to «property pnam»
set artboardNames to run script "
tell application id \"com.adobe.illustrator\"
«property bAl9» of artboards of current document
I’m sure this method requires a lot of overhead, but it seems to be foolproof and works well for my purposes.
It’s not simple to resolve these collisions. Of course, Debugger’s abilities to ‘Show Raw (Chevron) Syntax’ and ‘Lookup Definition’ are fantastic tools for sorting them out. To do so, one must determine the correct raw syntax from the application’s dictionary, then see whether it survives in the raw syntax of the compiled code. If not, then the run script command can save the day.
This illustrates another reason why Debugger is invaluable for AS development.