Label | API Name | |||||||||||||||||||
First NameFrom Address | cmcmsecureemail_datatransfer__FirstFromAddress_Name__c | |||||||||||||||||||
Last NameRecipients | cmcmsecureemail_datatransfer_Recipients_Last_Name__c | |||||||||||||||||||
Requester’s First Name | Requester_s_First_Name__c | You can get it from the User object | ||||||||||||||||||
Requester’s Last Name | Requester_s_Last_Name__c | |||||||||||||||||||
Requester ID | cm_datatransfer__Requester_ID__c | |||||||||||||||||||
Send via Phone | cm_datatransfer__Send_via_Phone__c | Send via Email | cm_datatransfer__Send_via_Email__c | Phone | cm_datatransfer__Phone__c | cm_datatransfer__Email__c | Email Message | cm_datatransfer__Email_Message__c | Email Subject | cm_datatransfer__Email_Subject__c | SMS Message | cm_datatransfer__SMS_Message__c | Link Message | cm_datatransfer__Message__c | Expiration Date | cm_datatransfer__Expiration_Date__c | Record Type | RecordTypeIdc | 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
Code Block |
---|
cmsecureemail__Secure_EmailMessage__c oRecord = new cmsecureemail__Secure_EmailMessage__c();
oRecord.cmsecureemail__FromAddress__c = 'from@email.com';
oRecord.cmsecureemail__Recipients__c = 'to@email.com';
oRecord.cmsecureemail__HtmlBody__c = 'Hello Cloud Maven';
oRecord.RecordTypeId = Schema.SObjectType.Secure_EmailMessage__c.getRecordTypeInfosByDeveloperName().get('Outbound').getRecordTypeId();
oRecord.cm_datatransfer__Parent_Record_Id__c = 'Record ID of the Parent Record';
oRecord.cmsecureemail__Reply_to__c = 'orgwide@email.com';
oRecord.cmsecureemail__Subject__c = 'Test Subject';
insert oRecord;
|