[SalesForce] How to Email Template be created in unit tests

Can I create an Email Template as part of the unit test? If yes, how?

Best Answer

Unfortunately at this time there isn't any support for creating Email Templates anywhere in APEX, which is the case for most metadata objects. For the most part these can only be manipulated through the browser or the metadata API.

Update this is now possible (see the other answers for more details)

Related Topic