CData Python Connector for HubSpot

Build 25.0.9454

UpdateCustomProperty

Modifies an existing custom property for a HubSpot object, supporting data customization.

Execute

When you need to update a Property to type Enumeration, you need to define its options (required).

There are two ways to do this. The first way is to feed all the json aggregate of the options directly to the options input, as shown below:

EXECUTE UpdateCustomProperty
TableName = 'DevObject',
PropertyName = 'TestEnumeration',
PropertyLabel = 'Test Enumeration',
PropertyGroupName = 'contactinfomation',
PropertyType = 'enumeration',
PropertyFieldType = 'radio',
Options = '[
                {
                    \"label\": \"Model-GT\",
                    \"value\": \"GT\",
                    \"description\": \"GT Model\",
                    \"displayOrder\": \"1\",
                    \"hidden\": \"true\"
                },
                {
                    \"label\": \"Model-AF\",
                    \"value\": \"AF\",
                    \"description\": \"AF Model\",
                    \"displayOrder\": \"2\",
                    \"hidden\": \"true\"
                },
                {
                    \"label\": \"Model-Z\",
                    \"value\": \"Z\",
                    \"description\": \"Z Model\",
                    \"displayOrder\": \"3\",
                    \"hidden\": \"true\"
                },
                {
                    \"label\": \"Model-0\",
                    \"value\": \"0\",
                    \"description\": \"0 Model\",
                    \"displayOrder\": \"4\",
                    \"hidden\": \"false\"
                }
            ]'

The second way is to make use of the Driver #TEMP tables for the aggregate value. To do that, you need to execute the following:

INSERT INTO PropertyOptions#Temp (OptionLabel, OptionValue, OptionDescription, OptionDisplayOrder, OptionHidden) VALUES ('TRUE', 'true', 'Yes', 1, false)
INSERT INTO PropertyOptions#Temp (OptionLabel, OptionValue, OptionDescription, OptionDisplayOrder, OptionHidden) VALUES ('False', 'false', 'No', 2, false)

After creating the temporary table with the options, we can execute the stored procedure as shown below:

EXECUTE UpdateCustomProperty
TableName = 'Contacts',
PropertyName = 'TestEnumeration',
PropertyLabel = 'Test Enumeration',
PropertyGroupName = 'contactinfomation',
PropertyType = 'enumeration',
PropertyFieldType = 'radio',
Options = 'PropertyOptions#Temp'

PropertyOptions temporary table schema info:

Column NameTypeRequiredDescription
OptionLabel string true Human-readable label for an enumerated option. Required if PropertyFieldType is set to an option-based input like select or radio.
OptionValue string true Internal value corresponding to the enumerated label. This value is used when setting the property through the API.
OptionDescription string false Optional description for the enumerated option. Appears as help text to clarify the option's meaning or use.
OptionDisplayOrder integer false Order in which this option appears in the UI. Lower positive integers appear first; -1 causes the option to appear last.
OptionHidden boolean false Specifies whether the option should be hidden from the HubSpot interface. Hidden options can still be used via API.

Input

Name Type Description
ObjectFullyQualifiedName String Fully qualified name of the object containing the custom property to be updated. Required if TableName is not specified.
TableName String Exposed table name of the object containing the custom property to be updated. Required if ObjectFullyQualifiedName is not specified.
PropertyName String Internal name of the custom property to update. Required if ColumnName is not specified and used for API interactions.
ColumnName String Exposed column name of the property to update. Required if PropertyName is not specified and used in the SQL schema.
PropertyLabel String Updated human-readable label for the property, shown in the HubSpot UI wherever the property is displayed.
PropertyGroupName String Updated group name for organizing the property within the HubSpot interface. Helps users locate properties more easily.
PropertyDescription String Updated help text for the property that appears in the HubSpot UI to guide users when entering values.
PropertyDisplayOrder Integer Controls the visual ordering of the property relative to others in the UI. Lower values are shown first; -1 places it after all others.
PropertyHidden Boolean Determines whether the property is visible in the HubSpot UI. Hidden properties are available for API use and automation only.
PropertyType String Data type of the property, such as string, number, date, enumeration, or datetime. Determines how the property stores data.
PropertyFieldType String Controls how the property is rendered in the HubSpot interface. Must be compatible with the specified PropertyType.
FormField Boolean Indicates whether this property can be used in HubSpot forms to collect information from users.
Options String Required only if PropertyType is set to enumeration. The input values should be a temporary table (#TEMP).

Result Set Columns

Name Type Description
Success Boolean Specifies whether the property was successfully updated using the stored procedure.
PropertyName String Internal name of the updated property. Returned for confirmation and reference purposes.
PropertyLabel String Updated display label of the property, shown in the HubSpot CRM and related interfaces.
ErrorCode String Code indicating the type of error encountered if the property update fails.
ErrorMessage String Detailed message explaining why the property update failed, returned if the operation is unsuccessful.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454