Custom fieldType & readonly property

The ‘phone’ property in hubspot has a defined field type of ‘phonenumber’ which includes phone number validation. This type is not available when creating custom properties via the UI. Trying to set the field type for a custom property (such as ‘phone_2’) yields an exception. Is there a way to utilize this field type for a custom property? Our company does have the Sales Enterprise package (the best package with Custom Object creation abilities).

Additionally I see properties of the return object when reading existing hubspot properties. There are ones referencing read_only options. Can these properties be set such that I can make a custom property read only?

Thanks.

Hi @RLehrhaupt

Phone number isn’t available to users as a custom property type either, and isn’t listed here: Property field types in HubSpot so this explains why you are not able to set it as the property type via API. No way around that, that I can think of, for now - please post it as an idea if you would like to see this feature developed.

Regarding read-only fields, this is usually going to be applied to fields that are set automatically by the software and that either don’t makes sense, or might be problematic, if the user could overwrite them. AFAIK this setting can not be applied by developers.

There is the option to restrict which users can see or edit certain properties: Restrict view and edit access for properties but I’m not seeing in the API docs yet (which appears to be backed up by: https://community.hubspot.com/t5/APIs-Integrations/Restricting-properties-via-the-API/m-p/437389)

Hope this helps a bit?

thanks!