• abhishek kamthan
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
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.
Hi,

When i am trying to create Custom Object Using Metadata Api in C# i am getting following error:
null: Must specify a nameField of type Text or AutoNumber

CustomObject cObject = new CustomObject();
            cObject.fullName = "Vistaa__c";
            cObject.deploymentStatus = metaforce.DeploymentStatus.Deployed;
            cObject.deploymentStatusSpecified = true;
            cObject.description = "Created by metadata API";
          
            cObject.enableActivities = true;
            cObject.enableActivitiesSpecified = true;
            cObject.label = "Vista Object";
            cObject.pluralLabel = cObject.label + "s";
            cObject.sharingModel = metaforce.SharingModel.ReadWrite;
            cObject.sharingModelSpecified = true;
            CustomField cf = new CustomField();
            cf.description = "Simple text field from API";
            cf.fullName = "Lead." + cObject.fullName + "__c";
            String fieldLabel = "";
            cf.label = fieldLabel.Length == 0 ? "Sample Field" : "Sample Field";
            cf.length = 50;
            cf.type = FieldType.Text;
            cObject.nameField = cf;

            SaveResult[] results = ms.createMetadata(new metaforce.Metadata[] { cObject });
 
Hi
I am getting following error when i am trying to create custom object
System.Web.Services.Protocols.SoapHeaderException: null: Must specify a nameField of type Text or AutoNumber

my code is as follows:

metaforce.CustomObject co = new metaforce.CustomObject();
                co.deploymentStatus = metaforce.DeploymentStatus.Deployed;
                co.deploymentStatusSpecified = true;
                co.description = "My Custom Object created from .NET";
                co.fullName = "DotNetCustomObject__c";
                co.label = "DotNet Custom Object";
                co.pluralLabel = "DotNet Custom Objects";
                co.sharingModel = metaforce.SharingModel.ReadWrite;
                co.sharingModelSpecified = true;
                co.enableActivities = true;


                CustomField nf = new CustomField();
                nf.type=FieldType.Text;
                nf.label= "DotNetCustomObject__c"+" Name";
                co.nameField = nf;
                SaveResult[] results = ms.createMetadata(new metaforce.Metadata[] { co });
Hi,

When i am trying to create Custom Object Using Metadata Api in C# i am getting following error:
null: Must specify a nameField of type Text or AutoNumber

CustomObject cObject = new CustomObject();
            cObject.fullName = "Vistaa__c";
            cObject.deploymentStatus = metaforce.DeploymentStatus.Deployed;
            cObject.deploymentStatusSpecified = true;
            cObject.description = "Created by metadata API";
          
            cObject.enableActivities = true;
            cObject.enableActivitiesSpecified = true;
            cObject.label = "Vista Object";
            cObject.pluralLabel = cObject.label + "s";
            cObject.sharingModel = metaforce.SharingModel.ReadWrite;
            cObject.sharingModelSpecified = true;
            CustomField cf = new CustomField();
            cf.description = "Simple text field from API";
            cf.fullName = "Lead." + cObject.fullName + "__c";
            String fieldLabel = "";
            cf.label = fieldLabel.Length == 0 ? "Sample Field" : "Sample Field";
            cf.length = 50;
            cf.type = FieldType.Text;
            cObject.nameField = cf;

            SaveResult[] results = ms.createMetadata(new metaforce.Metadata[] { cObject });
 
Hi
I am getting following error when i am trying to create custom object
System.Web.Services.Protocols.SoapHeaderException: null: Must specify a nameField of type Text or AutoNumber

my code is as follows:

metaforce.CustomObject co = new metaforce.CustomObject();
                co.deploymentStatus = metaforce.DeploymentStatus.Deployed;
                co.deploymentStatusSpecified = true;
                co.description = "My Custom Object created from .NET";
                co.fullName = "DotNetCustomObject__c";
                co.label = "DotNet Custom Object";
                co.pluralLabel = "DotNet Custom Objects";
                co.sharingModel = metaforce.SharingModel.ReadWrite;
                co.sharingModelSpecified = true;
                co.enableActivities = true;


                CustomField nf = new CustomField();
                nf.type=FieldType.Text;
                nf.label= "DotNetCustomObject__c"+" Name";
                co.nameField = nf;
                SaveResult[] results = ms.createMetadata(new metaforce.Metadata[] { co });