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

Metadata API: Creating a textarea custom field results in a string type of field in salesforce
Hi All,
I am using the Metadata API to add custom fields to a custom object.
The custom fields created should be identical in terms of field type to existing standard or custom fields in other standard or custom objects. For instance, I need to create a custom field that is of the same type as the Account Shipping Street.
The Account.ShippingStreet in salesforce is of type: textarea and length 255
When using the Metadata API to create a custom field of the same type, the field created ends up being of type: string and length 255, instead of type textarea.
I am using the deploy() method of the Metadata API so I create the package.xml file on the fly and deploy it. The <type> element in the file is textarea, and the <length> is 255.
Any ideas what I am missing here would be much appreciated.
Fernando
Sure.
My statement in the originl post: "I am using the deploy() method of the Metadata API so I create the package.xml file on the fly and deploy it. The <type> element in the file is textarea, and the <length> is 255. " was incorrect. The <type> element was text instead of textarea, so this is why it was creating a string instead of a textarea.
Hope it helps.
Fernando
All Answers
Please disregard this. Sorted.
Thanks,
Fernando
Could you share the solution so that it can help other developers?
Sure.
My statement in the originl post: "I am using the deploy() method of the Metadata API so I create the package.xml file on the fly and deploy it. The <type> element in the file is textarea, and the <length> is 255. " was incorrect. The <type> element was text instead of textarea, so this is why it was creating a string instead of a textarea.
Hope it helps.
Fernando
I am able to create TEXTAREA custom datatype using metadat api. But not able to set a length of 4000. It return with error message "WebService returned a SOAP Fault: null: Can not specify 'length' for a CustomField of type TextArea".
How to specify Text Area (Long) or Text Area (Rich)? SO that I can specify length? Please help me.
Yes, that's right.
Cheers
Fernando