Skip to content

Home

  • Salesforce Apex: How to Send Emails Using Templates Without a targetObjectId

    When sending an email using a template in Apex, the “targetObjectId” is typically required, which must be the ID of a Lead, Contact, or User. However, in many cases, you may not have a targetObjectId available, especially when sending an email from a custom object to an external email address that isn’t associated with a…


  • Salesforce Flow: Fixing Formatting and Rendering Issues in Emails with Rich-Text Templates

    When using the Send Email core action in Salesforce Flow to send an email with a rich-text body. Switching between plain text and rich text in the template editor alters the HTML markup, resulting in incorrect rendering and formatting issues. To avoid this, use a plain text template with HTML markup and select Rich-Text-Formatted Body…


  • Convert DateTime to another timezone and extract the date and time parts

    The article explains converting the current DateTime to a specific time zone using Apex code and then converts it to a string without altering it to the user’s local time zone. The string DateTime is then parsed into separate variables to extract the date and time components.Continue readingConvert DateTime to another timezone and extract the…