An Apex mocking framework for true unit testing in Salesforce, with Stub API support
BSD 3-Clause "New" or "Revised" License
423
stars
214
forks
source link
renderStoredEmailTemplate returns with an error System.EmailTemplateRenderException: INVALID_CROSS_REFERENCE_KEY: invalid cross reference id when passing Ids generated from fflib_IDGenerator #127
@raffaelle09, thanks for reaching out. There is no feature in ApexMocks to achieve this. You may have success by querying the EmailTemplate table and try your own merge to the template.
Is there anyway to render the email template body in the test class without committing the referenced records in the database?
just a quick sample: