Symptom
When saving templates in email services triggers the error: Maximum length limit exceeded for field msgBody_defaultValue: actual length: (not specific number above 4,000); maximum length: 4,000. Please retry saving the template with the required changes
Environment
SAP SuccessFactors Onboarding
Reproducing the Issue
- Access or create any email template
- When saving it triggers: Maximum length limit exceeded for field msgBody_defaultValue: actual length: (no specific number above 4,000); maximum length: 4,000. Please retry saving the template with the required changes
Cause
Email template passes 4,000 bytes which the maximum limit.
Resolution
The templates in Email Services have a maximum length of 4000 bytes on the database, the data stored cannot be over 4000 bytes.
It is also important to consider that the templates in Email Services are HTML based, and even though you enter the value "ABC" in the template, we would need to include the HTML tags in the character count. Therefore, we are not adding only 3 characters for the text (ABC), in database the text is stored as <p>abc</p>, including HTML tags.
In addition, Unicode characters are encoded in bytes, where each character in Unicode Transformation Format-8 (UTF-8) uses 1 byte, but special characters from Roman, Greek, Cyrillic, Coptic, Armenian, Hebrew, Arabic languages use 2 bytes, and Chinese and Japanese languages, among others, use 3 bytes per special character. If you are using special characters in the Email templates, the text size may vary from one locale to another.
Keywords
obx, onb, email, template, html, bytes, message, content, maximum , KBA , LOD-SF-OBX-EML , Notifications , Problem