Created
March 29, 2017 16:50
-
-
Save Walletau/3afa1c7bb38a846b41ea7a07d152724a to your computer and use it in GitHub Desktop.
MagicParentsSnippet5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Account a = [SELECT Id, Name, | |
Owner.Manager.Manager.ManagerId | |
FROM Account | |
WHERE Id = '001p000000K12dV' LIMIT 1]; | |
System.debug('1: ' + a.OwnerId); | |
System.debug('2: ' + a.Owner.ManagerId); | |
System.debug('3: ' + a.Owner.Manager.Manager.Manager.Manager.FirstName); | |
System.debug('3: ' + a.Owner.Manager.LastName); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment