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 

Salesforce MVP | Lightning Champion | 17x Salesforce Certified | Application Architect | 7x Trailhead Ranger | Techforce Services | Australia

Leave a Reply

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

*