We have an HTML email template, wherein a if statement outputs a blank by comparing for two values and a field value for rest. Please see below If statement:


Apart from Bronze and Gold team, rest team value should be printed. whenever team field value is Bronze or Gold it should not print anything and skip or remove blank line. As of now it shows a blank line. If anyone can help me with this.

  • Could you please add the screen shot for better understanding ?
    – user46657
    Jul 11 '17 at 11:21
  • @javaSystem, screenshot? will show the output (for team not equal to bronze and gold): UserName Home (team name) "all other details about case' (for team equal to bronze and gold): UserName (team name will be blank and this line creates extra space) "all other details about case'
    – N.jadhav
    Jul 11 '17 at 11:43
  • Try adding ouputPanel for that field and render it only if Case.Team__c is not null. Jul 11 '17 at 12:20
  • @Rohit, it's not a visualforce template. Anyway i got it resolved. Thanks
    – N.jadhav
    Jul 11 '17 at 12:32

A day invested for for single line escape! guys just copy pasted the code from HTML email template to notepad and removed space if any. It really worked by pasting back from notepad to HTML template.

Team mail: {!Case.Team_Email_Address__c}

Here in the above code, 2nd line won't create blank line/space in any condition, if you have copy pasted it from notepad. If edited or writing first time directly into the template please make sure such blank spaces are avoided by testing multiple times.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.