Skip to content

Instantly share code, notes, and snippets.

@tjsummerford
Last active December 6, 2019 16:06
Show Gist options
  • Save tjsummerford/87a6f0e8eb7596e3f52fbfcfaa9158a7 to your computer and use it in GitHub Desktop.
Save tjsummerford/87a6f0e8eb7596e3f52fbfcfaa9158a7 to your computer and use it in GitHub Desktop.
Useful SOQL Queries
//Get Cases followed by User
SELECT Id, CaseNumber, Subject, Owner.Name, Status, CreatedDate, ClosedDate
FROM Case
WHERE Id IN (SELECT ParentId FROM EntitySubscription WHERE SubscriberId = '')
ORDER BY CreatedDate
//Get User Signatures by Profile
SELECT id, FirstName, LastName, email, FederationIdentifier, LastLoginDate, Profile.Name, UserRole.Name, Signature
FROM user
where IsActive = true
and Profile.Name = ''
order by LastLoginDate desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment