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
abhishek kamthanabhishek kamthan 

'RichTextArea' is not a valid value for the enum 'FieldType'

Hi,

When i am trying to create new custom filed of type RichTextArea using soap, i am getting following error:

<faultcode>soapenv:Client</faultcode> 
<faultstring>'RichTextArea' is not a valid value for the enum 'FieldType'</faultstring> 

The soap envelop which i am sending is :
<metadata xsi:type="CustomField" xmlns:cmd="http://soap.sforce.com/2006/04/metadata">
                    <fullName>allFields__c.NewFieldTextRich__c</fullName>
                    <label>NewFieldTextRich</label>    
                    <type>RichTextArea</type><visibleLines>25</visibleLines>
                    <length>131072</length>
</metadata>
Please help me for the same.
ShashankShashank (Salesforce Developers) 
Please see this doc: https://www.salesforce.com/us/developer/docs/api_meta/Content/meta_field_types.htm#meta_type_fieldtype

Since rich text area is not on the list, we cannot create it via the SOAP API
Rakesh Gaikwad 8Rakesh Gaikwad 8
The type for RichTextArea should be Html,
eg.
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>CustomFieldAPIName</fullName>
    <encryptionScheme>None</encryptionScheme>
    <externalId>false</externalId>
    <label>Field Label</label>
    <length>32768</length>
    <trackHistory>false</trackHistory>
    <trackTrending>false</trackTrending>
    <type>Html</type>
    <visibleLines>25</visibleLines>
</CustomField>
for more information please refer Rich Text Area Field Limitations (https://dreamevent.secure.force.com/articleView?id=sf.fields_rich_text_area_limitations.htm&type=5)