Your text editor madeBecause of the wrong apostrophessheer number of tables involved, resultingyou can't use the SetupEntity relationship; in code that failed to compilethis way, it behaves more like a "special text field" rather than a "lookup relationship" field.
// This will not compile
System.debug(‘I am static method’);
// This one is okay
System.debug('I am static method');
Make sure you're The documentation does not specifically call this out, but if you check the examples, you'll notice there's no example of using Microsoft Word or some other "smart" editor to write your codethe SetupEntityId field as a relationship. If copy-pasting,You'd need to make sure the apostrophes are not "smart quotesseparate queries for each name that you need, which may mean querying hundreds of times (so, you might need to do it in chunks, depending on complexity)."