0

I am working on a requirement to create CustomField from a LWC form. I am able to use Tooling API to create customfields of type 'text'. I want to extend this functionality to other data types as well. Is there any resource I can refer to that will fetch all the available field datatypes?

What I'm looking for is the enum of the field types. Tooling API dev guide just stops at the CustomFieldMetadata level under the 'CustomField' Tooling API object. The type is mentioned as an attribute, but no further detail is given there.

Any help would be appreciated!

1 Answer 1

1

The available types are listed in several places, CustomField being one. I'm not sure if there's a way to actually "describe" these values dynamically; the Tooling API only describes the field as a "complexvalue". You might try checking the Metadata WSDL found in Setup under Tools for more detailed information. The known types as of the current documentation are:

  • Address
  • AutoNumber
  • Lookup
  • MasterDetail
  • MetadataRelationship
  • Checkbox
  • Currency
  • Date
  • DateTime
  • Email
  • EncryptedText
  • ExternalLookup
  • IndirectLookup
  • Number
  • Percent
  • Phone
  • Picklist
  • MultiselectPicklist
  • Summary
  • Text
  • TextArea
  • LongTextArea
  • Url
  • Hierarchy
  • File
  • Html
  • Location
  • Time
1
  • Seems like such an elementary miss that I did not check the Metadata docs for field types! Thanks a ton. I believe this will be usable in my component. Feb 8 at 16:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .