+ Start a Discussion
nelloCnelloC 

Compliance Bcc Email enabled or not in apex

Is there a way of knowing within apex code whether Compliance Bcc Email has been enabled or not? In order to appropriately allow (or not) users to select a bcc email address when sending an email.
nelloCnelloC
I guess that's a no then.
sfdcfoxsfdcfox

You should be able to determine the presence of this feature by using the following code:

 

 

Organization o = [select id,ComplianceBccEmail from Organization]; if(o.ComplianceBccEmail<>null&&o.ComplianceBccEmail<>'') { // Do not allow BCC, since there is a specific value set. } else { // Allow user-set BCC, since there is no specific value. }