You need to sign in to do that
Don't have an account?

SOQL join query
I am trying to get the profile name for the user that last modified an Opportunity to distinguish administrator updates versus user updates. This code doesn't seem to be working:
Select o.id, o.lastmodifiedby.name, o.lastmodifiedby.profile.name From Opportunity o
If this is too many levels, can I reference the current user id in a trigger? Will all the records in the 'new' collection of the trigger be for just for that current user or could it be for multiple users?
Thanks for the encouragement. I got it to work by removing the 'o.' references and capitalized the relationship names.
Select id, LastModifiedBy.Name, LastModifiedBy.Profile.Name From Opportunity
Thanks