You need to sign in to do that
Don't have an account?
gbrown17
custom controller - unexpected token 'apex.pages.currentpage'
Hi,
I'm having difficulty understanding where I went wrong when creating the apex class. I'm getting an error on line 12 - unexpected token: 'ApexPages.currentPage'.
Can someone shed some light on this for me?
Thanks,
Greg
public class aseAuditPDFController { public Credit__c__c getCredit() { //Retrieve Credit Application based on Id parameter of this page return [Select Id, Credit__c.Financial_Data__c, Credit__c.Forecast_Sales_per_Month__c, Credit__c.Customer_Type__c from Credit__c j where Id= ApexPages.currentPage().getParameters().get('id')]; } }
Hi Greg,
when referencing a non-literal in a SOQL query, you need to put a colon before the variable, like below.
All Answers
Hi Greg,
when referencing a non-literal in a SOQL query, you need to put a colon before the variable, like below.
Thanks it worked!