在第30行附近,在headervalue ='Credit'行中,它产生标题中显示的语法错误。有谁知道为什么? 我尝试在Salesforce论坛上得到答案,但被告知一切看起来都正确,我可以在VALUE属性中使用IF条件。 我确信这是一个简单的问题,但它让我们疯狂。
<messaging:emailTemplate subject="Statement" recipientType="Contact" relatedToType="c2g__codaMassEmailAccount__c">
<messaging:htmlEmailBody >
<p align="center">
<img src="{!relatedTo.c2g__OwnerCompany__r.c2g__LogoURL__c}"/><br/>
<small><apex:outputField value="{!relatedTo.c2g__OwnerCompany__r.c2g__Street__c}"/><br/>
<apex:outputField value="{!relatedTo.c2g__OwnerCompany__r.c2g__City__c}"/><apex:outputText value=", "/><apex:outputField value="{!relatedTo.c2g__OwnerCompany__r.c2g__StateProvince__c}"/><br/>
<apex:outputField value="{!relatedTo.c2g__OwnerCompany__r.c2g__ZipPostCode__c}"/><br/>
<apex:outputField value="{!relatedTo.c2g__OwnerCompany__r.c2g__Country__c}"/><br/>
<apex:outputText value="Phone: "/><apex:outputField value="{!relatedTo.c2g__OwnerCompany__r.c2g__Phone__c}"/><apex:outputText value=" Fax: "/><apex:outputField value="{!relatedTo.c2g__OwnerCompany__r.c2g__Fax__c}"/><br/><br/></small>
</p>
<p>
<c2g:CODAFormatterController date="{!TODAY()}"/>
<br/><br/>
<apex:outputField value="{!relatedTo.c2g__Account__r.Name}"/>
<br/><br/>
Hello,
<br/><br/>
Please find attached a statement of your account with us. We would appreciate prompt payment of these items.
</p>
<br/><br/>
<apex:dataTable value="{!relatedTo.c2g__MassEmailAccountLineItems__r}" var="line" border="1" cellpadding="3">
<apex:column style="text-align:left" headervalue="Document Type" value="{!line.c2g__Transaction__r.c2g__TransactionType__c}"/>
<apex:column style="text-align:left" headervalue="Document Number" value="{!line.c2g__Transaction__r.c2g__DocumentNumber__c}"/>
<apex:column style="text-align:left" headervalue="Document Reference" value="{!line.c2g__Transaction__r.c2g__DocumentReference__c}"/>
<apex:column style="text-align:center" headervalue="Due Date" value="{!line.c2g__DueDate__c}"/>
<apex:column style="text-align:left" headervalue="Currency" value="{!line.c2g__TransactionLineItem__r.c2g__DocumentCurrency__r.Name}"/>
<!-- The line below causes syntax error -->
<apex:column style="text-align:left" headervalue="Credit" value="{!IF(line.c2g__DocumentOutstandingValue__c<0, ABS(line.c2g__DocumentOutstandingValue__c), 0)}" />
<apex:column style="text-align:left" headervalue="Debit" value="{!line.c2g__DocumentOutstandingValue__c}"/>
</apex:dataTable>
<br/>
<!--
<apex:column style="text-align:right" headervalue="Outstanding Amount"><c2g:CODAFormatterController number="{!IF(line.c2g__Transaction__r.c2g__TransactionType__c!='Journal',ABS(line.c2g__DocumentOutstandingValue__c),line.c2g__DocumentOutstandingValue__c)}" currency="{!line.c2g__TransactionLineItem__r.c2g__DocumentCurrency__r.Name}"/>
-->
<p>
If you have any questions about this payment please do not hesitate to contact us at accountsreceivable.
<br/><br/>
Thank you,
<br/><br/>
{!$User.FirstName} {!$User.LastName}
</p>
</messaging:htmlEmailBody>