function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
blakeLLblakeLL 

Using Rich Text Field in customer controller

I have a controller with the following call:

public ProposalController() { opportunity = [ select o.AccountId, o.Account.BillingCity, o.Account.BillingState, o.Account.BillingStreet, o.Account.BillingPostalCode, o.Account.Industry, o.Account.Name, o.Contract_Date__c, o.HasOpportunityLineItem, o.Id, o.Pieces_per_Month__c, o.Agreement_Terms__c, (SELECT contact.name, contact.Title,contact.email FROM OpportunityContactRoles where isprimary = true), (SELECT PriceBookEntry.Name, PriceBookEntry.UnitPrice,PriceBookEntry.Product2.ContractSection__c FROM OpportunityLineItems) from opportunity o where id = :ApexPages.currentPage().getParameters().get('id')]; }

 

 

If I try to add a rich text field ot the query and save in Force.com ide:

 

public ProposalController()

{ opportunity = [ select o.AccountId, o.Account.BillingCity, o.Account.BillingState, o.Account.BillingStreet, o.Account.BillingPostalCode, o.Account.Industry, o.Account.Name, o.Contract_Date__c, o.HasOpportunityLineItem, o.Id, o.Pieces_per_Month__c, o.Agreement_TermsRTF__c, (SELECT contact.name, contact.Title,contact.email FROM OpportunityContactRoles where isprimary = true), (SELECT PriceBookEntry.Name, PriceBookEntry.UnitPrice,PriceBookEntry.Product2.ContractSection__c FROM OpportunityLineItems) from opportunity o where id = :ApexPages.currentPage().getParameters().get('id')]; }

 

for elipse I get the following error:

 

Save error: No such column 'Agreement_TermsRTF__c' on entity 'Opportunity'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

 

I would like to have my visual force page show this field, but I can't get the controller to allow it yet. It also is not showing up in the salesforce.schema view for the Force IDE.

Message Edited by blakeLL on 02-15-2010 12:53 PM
Best Answer chosen by Admin (Salesforce Developers) 
JimRaeJimRae
You would need to update your API version to 18.0 in order to see this field.  It is only supported once you have been upgraded to the new release, and you need to make sure your controller code was updated to the new API version as well.