You need to sign in to do that
Don't have an account?

Visualforce Email Template Causing Problems
Hi All,
Having a strange issue at the moment.
We have an APEX class updating a custom object, but it is failing with this error message:
INSUFFICIENT_ACCESS_OR_READONLY, user does not have access to use approval assignment email template: []
When the object is updated, a workflow email is sent as confirmation to the user. This is not a part of any approval process. In fact this object is not used in any approval process whatsoever.
We have already done plenty of experimenting and have discovered that if this workflow email is a VisualForce template containing any relatedto.FIELD , it fails with the above message. If it is any other email template type it works fine.
We tried a basic VisualForce template as below, which doesn't cause the error:
<messaging:emailTemplate subject="test" recipientType="User" relatedToType="customobject__c"> <messaging:HtmlEmailBody > test </messaging:HtmlEmailBody> </messaging:emailTemplate>
We then tried a VisualForce template with a field that works without error in the text based email..... but still it causes the above error in the visualforce template
<messaging:emailTemplate subject="test" recipientType="User" relatedToType="customobject__c">
<messaging:HtmlEmailBody >
test - {!RelatedTo.Field__c}
</messaging:HtmlEmailBody>
</messaging:emailTemplate>
So there must be a problem with accessing the RelatedTo fields, I guess?
But why do the text based emails work?
Updated the description of the issue, as I mis-wrote the last part of it :)
Having the same exact issue.
INSUFFICIENT_ACCESS_OR_READONLY, user does not have access to use approval assignment email template: []
A email template had a visualforce component and the user profile didnt have permission to the apex controller for that component. gave them permissions and it worked.
Hey Richard,
Even I have the same problem as yours but I am also not able to find the solution. If you have found any, please let me know at jayanth.g@crmit.com.
Thank you