Label | API Name | |
From Address | cmsecureemail__FromAddress__c | |
Recipients | cmsecureemail__Recipients__c | Comma separated email addresses in case of multiple recipients. |
HTML Body | cmsecureemail__HtmlBody__c | |
Parent ID | cmsecureemail__Parent_Record_Id__c | Record ID on which you want the Secure Email to get linked. |
Record Type ID | RecordTypeId | |
Reply to Email address | cmsecureemail__Reply_to__c | Should be Org wide email address |
Subject | cmsecureemail__Subject__c |
Sample Apex Code Snippet to create a Secure Email record
cmsecureemail__Secure_EmailMessage__c oRecord = new cmsecureemail__Secure_EmailMessage__c(); oRecord.cmsecureemail__FromAddress__c = '+19171234567'; oRecord.cmsecureemail__Recipients__c = '+12012345678'; oRecord.cmsecureemail__HtmlBody__c = '068XXXXXXXXXXXXXXX'; oRecord.RecordTypeId = Schema.SObjectType.eFAX__c.getRecordTypeInfosByDeveloperName().get('OutBound_eFAX').getRecordTypeId(); oRecord.cm_datatransfer__Parent_Record_Id__c = 'Record ID of the Parent Record'; oRecord.cmsecureemail__Reply_to__c = 'Record ID of the Parent Record'; oRecord.cmsecureemail__Subject__c = 'Record ID of the Parent Record'; insert oRecord;