-
Salesforce Apex: Generate and Parse XML
The Apex code illustrates how to generate XML containing Account information and its related Contacts. It includes the Account details in the root tag and adds the Contacts within a tag. The code also demonstrates how to parse the XML to retrieve the Account and Contacts data.Continue readingSalesforce Apex: Generate and Parse XML
-
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…