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
Sabrina Oliveira 3Sabrina Oliveira 3 

Invalid field for SObject

Hi, guys!
I have 2 fields that I'd like to use in my VFP.
User-added image
Valores_ativos_e_passivos__c is working fine, but when I try to use Ativos_e_passivos__c I receive the Invalid field for SObject error. What am I missing?

Working FINE:
<table>
                <h4>
                   Ativos e passivos
                </h4> 
                {!KYC_Form__c.Valores_ativos_e_passivos__c}
 </table>

NOT working:
<table>
                <h4>
                   Ativos e passivos
                </h4> 
                {!KYC_Form__c.Ativos_e_passivos__c}
</table>

I've tried "KYC_Form__r.Ativos_e_Passivos__c" but the error still the same. The problem can be the type of the field?
 
Shubham Raj 29Shubham Raj 29

Hi @Sabrina Oliveira 3,

You can use the below tag to display rich text area in the visualforce page.

<apex:inputtextarea label="RichText"  richtext="true" value="{!body}" 
     id="Body" cols="100" rows="15"/>


or can try this one-

<apex:inputField value="{!Account.RichText__c}"/>

Let me know if this was helpful. If it does, please mark it as Best Answer to help others too.

Thanks,
Shubham Raj
Sabrina Oliveira 3Sabrina Oliveira 3
Hi Shubham Raj 29, thanks for your answer but it didn't worked for me. Still facing tha same issue
Shubham Raj 29Shubham Raj 29

Hi @Sabrina Oliveira 3,

I think the issue is related to the referencing of the field. The '__r' notation will be the correct one to use instead of '__c'.

Can you try this one in your code -

{!KYC_Form__r.Ativos_e_passivos__c}

 

Let me know it worked or not in your case

Thanks,
Shubham Raj.