I'm redirecting the user from my lightning component to Lightning Email template creation popup.
Currently, the user has access to create there own from setup but to eliminate going to setup, I've set a redirect to the lightning email template creation page using $A.get("e.force:navigateToURL")
Following is the code,
onNewEmailTempCreate : function(component, event, helper) {
var sel = component.find("Template").get("v.value");
if(sel === 'New Email Template'){
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url": "/lightning/o/EmailTemplate/new?count=1&nooverride=1&useRecordTypeCheck=1&navigationLocation=LIST_VIEW&backgroundContext=%2Flightning%2Fo%2FEmailTemplate%2Fhome"
});
urlEvent.fire();
}
},
This code is working fine in redirecting and showing the creation page but I see following error when saving, "Template Unique Name must be provided.: Template Unique Name RelatedEntityType can only be specified for SFX Custom Templates.: Custom Object Definition ID"
The name i'm using is unique and doesn't already exist.
Please let me know if i'm missing something.