Skip to content

Instantly share code, notes, and snippets.

@TonyRenHK
Created November 15, 2016 07:01
Show Gist options
  • Save TonyRenHK/fcec1bb7cdd4d2e1b23d929e683be81e to your computer and use it in GitHub Desktop.
Save TonyRenHK/fcec1bb7cdd4d2e1b23d929e683be81e to your computer and use it in GitHub Desktop.
How to log issue in SFDC by sending email?
Log__c log= new Log__c( name='log!');
insert log;
Blob b = Blob.valueOf(body);
Attachment attach1= new Attachment();
attach1.ParentId = log.id;
attach1.Name = 'log.txt';
attach1.Body = b;
insert attach1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment