+ Start a Discussion
nelloCnelloC 

DML not allowed on OrgWideEmailAddress

I am trying to create an OrgWideEmailAddress in apex (via an insert in a testmethod) but I'm getting the message "Save error: DML not allowed on OrgWideEmailAddress" on compile. Any ideas on why this create is not being allowed? The OrgWideEmailAddress object specifies supported calls of: create(), delete(), query(), retrieve(), update().

 

 

OrgWideEmailAddress newOwea1 = new OrgWideEmailAddress(Address='testOwea1@test.com',DisplayName='TestOwea1');
OrgWideEmailAddress newOwea2 = new OrgWideEmailAddress(Address='testOwea2@test.com',DisplayName='TestOwea1');
insert newOwea1;
insert newOwea2;

 

 

 

CloudConversionCloudConversion

Hi Nello.  It's not currently supported, so I've created an Idea for that:  https://sites.secure.force.com/success/ideaView?c=09a30000000D9xtAAC&id=08730000000KlHZAA0 

 

Please vote!