Limitation on characters in subject of an Email template

What have you tried?

  1. Tried below template in subject line
    #set($year = ​$spTools.formatDate($certification.expiration, "yyyy"))#set($dueDate = $spTools.formatDate($certification.expiration, "MM/dd/yyyy"))#set($Integer = 0)#set($quarter = ($Integer.parseInt($spTools.formatDate($certification.expiration, "MM")) + 0)/3 + 1) Action Required: ​$spTools.formatDate($certification.expiration, "yyyy") [0$quarter] Access Review Assigned to You – Due $spTools.formatDate($certification.expiration, "MM/dd/yyyy")
  2. Also tried to define a variable and reuse it like below, but no email was sent
    #set($expiry = $certification.expiration) #set($year = ​$spTools.formatDate($expiry, "yyyy"))$year

What errors did you face (share screenshots)?

  1. Not able to save the email template.
    Seems like the length is beyond the limit as I was able to save with part of the template
  2. Email not sent

What is the result you are getting and what were you expecting?
Would like to send email with subject line containing calculated values based on the template above

@iamology

try this

#set($month = $numberTool.toNumber($spTools.formatDate($certification.expiration, "MM")))
#set($quarter = $mathTool.toInteger(($month - 1) / 3 + 1))

Action Required: $spTools.formatDate($certification.expiration, "yyyy") [Q$quarter] Access Review Assigned to You – Due $spTools.formatDate($certification.expiration, "MM/dd/yyyy")


1 Like

Thanks @sidharth_tarlapally
Still cannot save the template with entire template. However, can save with subject as below:
#set($month = $numberTool.toNumber($spTools.formatDate($certification.expiration, "MM")))#set($quarter = $mathTool.toInteger(($month - 1) / 3 + 1))Action Required: $spTools.formatDate($certification.expiration, "yyyy") [Q$quarter] Access Review Assigned
If any characters added to above string, email template fails to save

@iamology

can you share the entire template please

1 Like

There is no issue with the body of the email. It’s the subject line I am trying to customize. What I shared in the original post is the entire subject

@iamology

Nitesh .. It seems the char limit is 250 . I suggest to try workflows , build the logic in the workflow .

1 Like

Thanks @sidharth_tarlapally

That’s what I thought too and was trying to define a variable and reuse that to reduce the total length of characters in subject

Also, it’s funny that the limitation is applied to velocity template instead of actual subject line populated

1 Like

true :smile: !!

Can you simplify the subject and have the current intened subject in the body as heading line ? As I see no other option and shifting to workflows is additional job .

1 Like

That’s the last option, but I hope to make this work

I think isc has same limit as iiq 255 char . i think in backed it uses same table :smiley: