You need to sign in to do that
Don't have an account?
Need help with a Case trigger to populate a Case email field
Hello All,
I need some help with a case trigger. Here's my setup and what I am trying to do:
I have a Case email field called Designated Email Address (from Account) - it's API Name is Designated_Email_Address_from_Account__c. I also have an Account email field called Designated Email Address - API Name is Designated_Email_Address__c. On the Case detail page, I have the standard Account Name field which is a lookup on the Account object.
What I want done via a trigger is when I update the Account Name field on the Case by the lookup, that it will also populate the Designated_Email_Address_from_Account__c on the Case based on the Designated_Email_Address__c from the Account.
Please post the code to make this happen along with code comments as I would like to learn how you came up with the code.
Thanks!
Hi
will you check this code..
Did this post answers your question if so please mark it solved so that others get benifited.
Thanks
All Answers
Hi
will you check this code..
Did this post answers your question if so please mark it solved so that others get benifited.
Thanks
Thanks asish1991 that worked.
Hey asish,
So I got this to work in my dev org.
However, now I am trying deploy this to my production using Eclipse and I am getting:
1 Error - test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required
2 Warnings - File only saved locally, not to server.
Could you provide the code to fix this?
Hi
you need to write a test class for code coverage of that trigger...
Here is some reference you can refer
Thanks
Asish,
Thanks very much for the test class. I am getting it to save locally in the Force.com IDE however I can't deploy to the server.
Here is a screenshot of error message and you can see the test class behind it at https://www.box.com/s/w15re8q9evoimv6baipa
Please advise.
Thanks!