Some small details and a test:
• record.Type. And search.Type enum are not always the same thing, for search.lookupFields you may want to use search.Type.
• Try with: search.Type.ENTITY
a
Anthony OConnor
08/19/2026, 12:17 AM
you're not wrong but both search.Type.VENDOR and record.Type.VENDOR are gonna resolve to the string
'vendor'
so I don't think that's the answer here, but still worth calling it out