I want to update email address associated with email to case settings after refresh in my sandbox. I want to complete this using apex code, is there any method to achieve this?
-
1I couldn't find anything to generate these addresses. I am afraid it is more of an administrative activity.– SalesforcesmartyCommented Feb 25, 2016 at 9:06
-
i typically include the staging E2C address in my production org so when sandbox refresh occurs, I have it available for use– cropredyCommented Feb 8, 2023 at 23:47
Add a comment
|
1 Answer
The easiest way to update E2C is via the Setup UI.
However, OrgWideEmailAddress
is a metadata type that can be accessed in SOQL.
select id, DisplayName, Address from OrgWideEmailAddress
If you can locate the relevant address, you should be able to update it via DML.