You need to sign in to do that
Don't have an account?
Chandrakanth
VF email template error
Hi All,
I am stuck in writing a test class due to this error. Can anyone please let me know where i am going wrong.
here is the test class.
EmailTemplate emailTemp = new EmailTemplate ();
emailTemp.subject = 'Licence reallocations*******';
emailTemp.HtmlValue='<messaging:emailTemplate subject="Test sub" recipientType="User" relatedToType="MTR_Email_Notification__c"></messaging:emailTemplate>';
emailTemp.Name ='ChangeLocation';
//emailTemp.Body ='xxxxxxxxxx';
emailTemp.developerName = 'test';
emailTemp.TemplateType='visualforce';
emailTemp.FolderId = UserInfo.getUserId();
emailTemp.isActive = true;
emailTemp.Markup='Body body';
insert emailTemp;
But whene i run the method i am getting follwing error.Line number 16(from the screen shot) is insert emailTemp.
![enter image description here][1]
I am stuck in writing a test class due to this error. Can anyone please let me know where i am going wrong.
here is the test class.
EmailTemplate emailTemp = new EmailTemplate ();
emailTemp.subject = 'Licence reallocations*******';
emailTemp.HtmlValue='<messaging:emailTemplate subject="Test sub" recipientType="User" relatedToType="MTR_Email_Notification__c"></messaging:emailTemplate>';
emailTemp.Name ='ChangeLocation';
//emailTemp.Body ='xxxxxxxxxx';
emailTemp.developerName = 'test';
emailTemp.TemplateType='visualforce';
emailTemp.FolderId = UserInfo.getUserId();
emailTemp.isActive = true;
emailTemp.Markup='Body body';
insert emailTemp;
But whene i run the method i am getting follwing error.Line number 16(from the screen shot) is insert emailTemp.
![enter image description here][1]
I read the error message and it says about Tag, please check your VF page of template and the tag arrangement.
Thanks,
Pratik