I'm working on a managed package that will allow users to select an object in their org and create a mapping with an external service. I noticed that
Schema.getGlobalDescribe() returns a plethora of objects of likely very little interest for our use case (e.g. objects describing sharing, roles, platform objects).
I peeked around at some packaged code and found that a common filter for objects to display is
isCreateable() && isUpdateable() after getting the global describe. In my dev org this returns 191 objects. If I filter it a bit further to remove any object ending with
Role, I'm down to 155. Still a lot of stuff users won't care about for our use case though. I cross-referenced with a query on
isLayoutable = true and got the list down to 110. I still end up with a lot of "Special" standard SObjects like
DuplicateRecordItem that are exceedingly unlikely to fit the use case.
I'm being a little vague here on what really should constitute a "first-class" object because maybe I don't even know what to look for, but does anyone have any ideas on what you'd usually filter by to ensure you only return "important" standard SObjects (and all custom ones because we can't judge) for the user to select from?