How to send email from APEX with an attachment.

Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment(); efa.setFileName(‘test.pdf’); //File Name efa.setBody(someFile); efa.setContentType(‘application/pdf’); // File type email.setSubject( ‘adada’ ); email.setToAddresses( new String[] {‘[email protected]’} ); // List of email ids. email.setPlainTextBody( ‘Tjis is test’ ); email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa}); Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});

Consideration for enabling manual sharing in Salesforce

Consideration for enabling manual sharing in Salesforce To do Manual Sharing: The person must be one of the following users. (Record level permission)  The record owner. A user in a role above the owner in the hierarchy. Any user granted Full Access to the record. (Modify all data access permission to the object) An administrator … Continue reading “Consideration for enabling manual sharing in Salesforce”

Sample Page

This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I’m a bike messenger … Continue reading “Sample Page”

My account

Login Username or email address * Password * Remember me Log in Lost your password?