Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
RenderEmailTemplateResult
| Name | Type | Description |
|---|---|---|
| bodyResults | RenderEmailTemplateBodyResult[] | Contains status and error information for each template body that renderEmailTemplate() processed in a request, including merged body text of templates. |
| errors | Error[] | Contains one or more errors that occurred when renderEmailTemplate() rendered a request. |
| success | boolean | Indicates whether a request was successfully processed (true) or not (false). |
RenderEmailTemplateBodyResult
Contains status and error information for each template body that renderEmailTemplate() processed in a request, including merged body text of templates.
| Name | Type | Description |
|---|---|---|
| errors | RenderEmailTemplateError[] | Contains one or more errors that are associated with a template body that renderEmailTemplate() processed. |
| mergedBody | string | The text of the template body with the merge fields replaced with their
corresponding values from Salesforce objects. The whatId and
whoId fields on the request reference the Salesforce objects
to use. The mergedBody field is populated only when the rendering of the template was successful (success is equal to true). If success is equal to false, mergedBody is null. |
| success | boolean | Indicates whether a template body was successfully rendered (true) or not (false). |
RenderEmailTemplateError
An error that occurred when renderEmailTemplate() processed a template body.
| Name | Type | Description |
|---|---|---|
| fieldName | string[] | The merge field that affected the error condition. |
| message | string | Error message text. |
| offset | int | The offset in the template body text of the merge field that caused the error. The offset is calculated as the number of characters from the start of the body text. The offset is -1 if it can’t be determined because of insufficient contextual information. |
| statusCode | StatusCode | A code that characterizes the error. The full list of status codes is available in the WSDL file for your organization (see Generating the WSDL File for Your Organization). |