+ Start a Discussion

Conditional Statements in VF Email Template not working


I have the following code in my VF Email Template:
<apex:outputText rendered="{IF(!relatedTo.RecordTypeId = '012a00000018Ens')}">{!relatedTo.id}</apex:outputText>
The relatedTo type here is "Case".  The goal here is to have the VF Email Template send to an external Contact when an agent makes a new public comment on the Case.  The above format does absolutely nothing when I do verify merge field tests.

I have also tried the following:
<div style="{IF(!relatedTo.RecordTypeId = '012a00000018Ens')},'display:block;','display:none;'">{!relatedTo.id}</div>
Again, nothing.

I have read other articles that say to include an exclamation point in front of the "IF", but when I do that I get the following error:
Error: Incorrect parameter type for function 'not()'. Expected Boolean, received Text
I really need to get this to work asap. 

Any help?

Ankit Maini.Ankit Maini.
Try this :
<apex:outputText rendered="{!relatedTo.RecordTypeId == '012a00000018Ens' }">