How to get the Salesforce Org Wide Address ID

we can get the Org Wide Address ID Using ‘Organization Wide Address’  Salesforce Object. below is the Sample Apex Class


for(OrgWideEmailAddress owa : [select id, Address, DisplayName from OrgWideEmailAddress]) {
if(owa.Address.contains('TBR')) {
email.setOrgWideEmailAddressId(owa.id);
}
}

Written by 

2x Salesforce MVP | Platform Champion | 18x Salesforce Certified | MuleSoft Certified | 8x Trailhead Ranger | TechForce Services | Sydney | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *

*