You need to sign in to do that
Don't have an account?
![lodoss118 lodoss118](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
How do i access the the Owner(User) object in account or other standard objects?
I.e in accounts using apex i can do
Account a;
a.Owner.UserRoleId;
In my trigger before insert this field is always null or the owner object is always null why is that?
for(Account a : trigger.new) {
a.Owner.userRoleId; //this is always null do i have to use an SOQL statement or something.
}
Account a;
a.Owner.UserRoleId;
In my trigger before insert this field is always null or the owner object is always null why is that?
for(Account a : trigger.new) {
a.Owner.userRoleId; //this is always null do i have to use an SOQL statement or something.
}
i know on insert it should be null bu tnot when it is an update?