I want to fetch type of hierarchy setting(profile OR User), compare it and do some logic. For that I am using setupOwner.Type in SOQL query as:
SELECT SetupOwner.Name,SetupOwner.Type,SetupOwnerId, Field1__c, FROM MyUserSettings__c ORDER BY SetupOwner.Name
It is giving me output as:
> SetupOwner.Type for User: 'User' > SetupOwner.Type for profile: '00e' > SetupOwner.Type for org: '00D'
But when I use where clause:
it gives me 0 results.
How can we obtain records where type is 'Profile'? Or what is the API name of field 'Location' in hierarchy settings?
Also, I could not find official documentation for 'SetupOwner'. Is there any?