Skip to content

Instantly share code, notes, and snippets.

@brianmfear
Created April 7, 2016 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianmfear/40d37e091e02d179c5191e05a7ce5c46 to your computer and use it in GitHub Desktop.
Save brianmfear/40d37e091e02d179c5191e05a7ce5c46 to your computer and use it in GitHub Desktop.
Visualforce Formula Compilation Error
public class OpportunityController {
public Opportunity[] getOpps() {
return [SELECT Name, Amount FROM Opportunity LIMIT 10];
}
}
<apex:page controller="OpportunityController">
<apex:dataTable value="{!opps}" var="opp">
<apex:column headerValue="Opp Name" value="{!opp.Name}" />
<!-- The following line will not compile:
<apex:column headerValue="Amount (Thousands)" value="{!opp.Amount / 1000}" />
-->
<apex:column headerValue="Amount (Thousands)">
{!opp.amount / 1000}
</apex:column>
</apex:dataTable>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment