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

VF email template: rendered="{!len(relatedTo.customer_field__c)>0}" cannot work
Hi, I just witnessed this weird thing:
<apex:outputField value="{!CP_Preapproval__c.LDs_on_Delivery__c}" style="width: 600px" rendered="{!len(CP_Preapproval__c.LDs_on_Delivery__c)>0}"/>
This works in my VF page.
But this does not work in my VF email template:
<apex:outputField value="{!relatedTo.LDs_on_Delivery__c}" rendered="{!len(!relatedTo.LDs_on_Delivery__c)>0}"/>
Error: The element type "apex:componentReference" must be terminated by the matching end-tag "</apex:componentReference>". at line 216
Why is this?
(I have to remove all markup and paste line by line to locate this error. after I remove it, I can save the template)
Try this:
<apex:outputField value="{!relatedTo.LDs_on_Delivery__c}" rendered="{!0 < len(!relatedTo.LDs_on_Delivery__c)}"/>