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

getting "line breaks not allowed in string literals" for simple Select Option
I followed this tutorial on drop down lists to the T and I'm still getting "line breaks not allowed in string literals" in my eclipse...http://www.soliantconsulting.com/blog/2009/07/the-user-visualforce-and-apex-about-a-drop-down-menu/
public with sharing class mc_FCCContractNegotiation { //================================================== // PROPERTIES //================================================== public mc_Price_Sheet_Code_Entry__c pricesheetCodeEntry {get;private set;} public mc_Carrier_Contract_Negotiation__c ContractNeg {get;private set;} public List<mc_CodeEntry> codeEntries {get;private set;} public List<mc_CodeEntry> SGcodeEntries {get;private set;} public String lookupCode {get; set;} public ApexPages.StandardSetController pricesheetEntries {get;private set;} private List Ranks; private String Rank; public mc_FCCContractNegotiation(ApexPages.StandardController controller) { getRank(); this.ContractNeg = (mc_Carrier_Contract_Negotiation__c)controller.getRecord(); //codeEntries = mc_CodeEntry.load(contractNeg.id, ContractNeg.getInstance('Standard Charge - Current Year')); lookupCode = null; } public PageReference doLoadCodes(){ SGcodeEntries = mc_CodeEntry.load(ContractNeg.Facility_Carrier_Contract__c, 'a2N400000004CKqEAM'); codeEntries = mc_CodeEntry.load(ContractNeg.Facility_Carrier_Contract__c, ContractNeg.Code_Price_Sheet__c); doSpecifyReimbursementRate(); return null; } public PageReference doSpecifyReimbursementRate(){ mc_CodeEntry.calculateReimbursementAmount(SGcodeEntries, ContractNeg.Rate__c); mc_CodeEntry.calculateReimbursementAmount(codeEntries, ContractNeg.Rate__c); return null; } public String getRank(){ return this.Rank; } } public List getRanks() { List Ranks= new List(); Ranks.add(new SelectOption('00','Selection')); Ranks.add(new SelectOption('ED','ED')); Ranks.add(new SelectOption(’MC’,'MC’)); Ranks.add(new SelectOption(’HM’,'HM’)); Ranks.add(new SelectOption(’UC’,'UC’)); return Ranks; } public String getRank(){ int val=0; if(Rank == ‘ED’){ val = 1; }else{ if(Rank == ‘MC’){ val = 2; }else{ if(Rank == ‘HM’){ val = 3; }else{ if(Rank == ‘UC’){ val = 4; } } } } return Rank; } }
Any ideas?
Some of your single-quote chars are the wrong char -- the ones that renders straight up/down are the correct char here. Look closer, some of yours slant to the right (opposite slant of a backquote ala shell script).
All Answers
Some of your single-quote chars are the wrong char -- the ones that renders straight up/down are the correct char here. Look closer, some of yours slant to the right (opposite slant of a backquote ala shell script).
Didn't know there was a difference in single quotes haha. Thanks though. That definitely was the isuse.