You need to sign in to do that
Don't have an account?
Scott Carlson
How to reference Case owner in Apex on New Case Creation?
I am trying some things out on my road to learning Apex.
Here is my current challenge: I want to send details on a new case via email to a specified email address, only when a new case is created.
I have written some code - which sends an email and includes some of the field values for a new case, but it leaves off the lookup field values (in other words, when I reference the Account.BillingCity, Contact.Email, etc.), I get null values.
From what I can tell, it looks like lookup values are inserted on new record creation after the case is inserted (and after the "After Insert" triggers have fired - this is why I get null values when the fields are referenced in my sent email.
I could use some advice on how to pull in these lookup values as part of my trigger - so I don't have a bunch of Null values for lookup fields.
Thanks in advance
Here is my current challenge: I want to send details on a new case via email to a specified email address, only when a new case is created.
I have written some code - which sends an email and includes some of the field values for a new case, but it leaves off the lookup field values (in other words, when I reference the Account.BillingCity, Contact.Email, etc.), I get null values.
From what I can tell, it looks like lookup values are inserted on new record creation after the case is inserted (and after the "After Insert" triggers have fired - this is why I get null values when the fields are referenced in my sent email.
I could use some advice on how to pull in these lookup values as part of my trigger - so I don't have a bunch of Null values for lookup fields.
Thanks in advance
Instead of...
Now it works!
All Answers
Instead of...
Now it works!