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

Having trouble referencing Account object in trigger. Code fails "Fatally"
Trigger UpdateParentAcct_OldOrg on Account ( after update) {
// the line below fails;
Account a;
}
// the line below fails;
Account a;
}
There are trigger context variables to which you have access and can use within your trigger. See those in this documentation: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_context_variables.htm.
I recommend iterating over all of the records using something like: Let us know if you have a specific question.
-greg
Trigger UpdateParentAcct_OldOrg on Account ( after update) {
// the line below fails;
for(Account a: Trigger.new)
{
}
}
The instant I reference the "Account" object the code fails, meaning no changeset can be validated, no "Force.com" file is saved to the server.
It's weird.