I want to use mapped columns as there are a couple of key columns containing attachments that I don’t want to be lost if they are renamed, however I also need to read the rest of the columns as they will be displayed in a table layout. No matter what I try I only get the mapped columns, even when trying to use the column options:
const result = await grist.docApi.fetchSelectedRecord(1, {"includeColumns" : "full"});
The plugin api is all over the place now. I have no idea why your code doesn’t work, as per the docs, it totally should, but whatever. Personally, I’ve taken to simply using grist.docApi.fetchTable(tableName) whenever I need to get something done. Though, stupidly, that function gives you a huge array in column format, so you need to convert it into something more sane. For example, like this:
Get all records of a table, with absolutely every last column included, by doing GristUtil.fetchTableRecords(yourTableNameHere)
Find a specific record from the list you just obtained using GristUtil.lookupOne(recordsListFromAboveGoesHere, {someColumnName: someValueToLookup, someOtherColumnName: someOtherValueToLookup})
Hope this helps!
(Also hope the devs get around to overhauling the catastrophic mess that is the plugin api at this point. )