You need to sign in to do that
Don't have an account?
Alaa
accessing Account object inside a trigger on opportunity
Hi , I have a trigger on opportunities after update, in the trigger am trying to get the Account object as follow:
for (Opportunity o : Trigger.new) {
.
.
.
acc=o.Account;
.
.
.
}
but the acc object is always null while the oportunity am updating has parent acount, whats wrong?
You have to query for that data. Here's a typical example:
As a general rule, no related records are ever provided "by default"; you have to query the database to get at that information.
All Answers
You have to query for that data. Here's a typical example:
As a general rule, no related records are ever provided "by default"; you have to query the database to get at that information.
Thanks. now its working.