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

Using the New "Rich Text Area" Data Type in VisualForce?
We're trying to use the new "Rich Text Area" Data Type in our VisualForce pages, but getting the following error:
"Error: Invalid field Main_Content__c for SObject CloudConversion__Portal_Content__c"
This is supported yet? Is there a special trick to get it to work?
Thanks,
Jon
<apex:outputText escape="false" value="{!content.Main_Content__c}"/>
Ok, thanks for all your help! I figured out a workaround, but I believe this is a bug.
Apparently, the <apex:composition> and <apex:define> don't play nice with the new Rich Text fields.
So, we've just changed the <apex:insert> to instead be a component.
Thanks,
Jon
All Answers
What about:
Is the instance on Spring 10?
Nope, get the same error. Yes, this is Spring '10 with the new Rich Text Area field.
Thanks,
Jon
Only other thing I can think if is that this field, "Main_Content__c" doesn't exist on this object "CloudConversion__Portal_Content__c" as this is what the messages is saying.
If your positive it exists and spelling is correct you may need to reach out to salesforce support.
"<apex:outputfield"
However, if I try and change the API version of the page to 17.0, I get the same error - so check that the API version page is also set to 18.0
Ok, thanks for all your help! I figured out a workaround, but I believe this is a bug.
Apparently, the <apex:composition> and <apex:define> don't play nice with the new Rich Text fields.
So, we've just changed the <apex:insert> to instead be a component.
Thanks,
Jon
I have a rich text area field "Additional Info" on a custom object on a VF page (overriding New/Edit) using the standard controller for the object. I would like to be able to edit this rich text field on my VF page:
<apex:pageblocksection>
<apex:inputField value="{!MyObject__c.Additional_Info__c}"/>
</apex:pageblocksection>
Before reading this post, I received a similar error message from the VF page compiler which would not allow the page to save ("Error: Invalid field Additionalnfo__c for SObject MyObject__c"). After changing the page version to 18.0, I can now save the VF page, however it results in the following error in the main window:
"Invalid field 'additional_info__c' for SObject 'MyObject__c'."
I'm not using any components or compositions, so I didn't think the previous post applied to my case.
Suggestions greatly appreciated!
Try: <apex:inputTextArea richText="true" value="{!MyObject__c.Additional_Info__c}"/>
Also, I logged a case last week and was unable to reproduce the issue for Salesforce support yesterday. It was either fixed during that week or something else was causing the issue. So, we're going back to using templates now.
Thanks,
Jon
I tried inputTextArea right after my last post. It results in the same error. What's interesting is that if I use a regular text field (not Rich Text), it works fine while editing. However, it displays with all the markup on the default detail page.
I also tried using inputTextArea with a variable passed to my controller extension. I thought I my extension could read the input from the rich text area and then assign it to my Rich Text Area field. The same error occurred while compiling the extension (Invalid field Additional_Info__c for sObject ...).
I had the same problem and I was able to fix it! It is a simple versioning issue!
Check the version of the visualforce page or class or trigger, etc . that you are trying to save. Most likely it is an older version that cannot access rich text areas. Simply update the version to the latest one (I am on 19 now), and save it. Now you should be able to reference rich text areas without problem!
Hope that helped!
Hi,
As an administratoe, From where can i update the Api version?
This may serve as additional reference:
http://boards.developerforce.com/t5/Visualforce-Development/Problem-on-Text-Area-Rich-while-using-it-on-visual-force-page/td-p/242047
Thanks
Thanks for the answer!