Updating enumeration properties with read_only_value
I’m working on a plugin to populate hubspot fields with woocommerce purchases.
I was wondering how I can go about adding options to enumeration properties when those enumeration fields have the read_only_value set on them? My requests I’m sending through the api return the following snippet from json.
“message”:"Field ‘read_only_value’ cannot be modified for property ‘categories_bought’
This is happening for several enumeration fields. How do I go about either removing read only from these fields, or bypassing this through the API?
I’ve tried searching through documentation for this and have come across very little, thanks in advance!
Updating enumeration properties with read_only_value
Hi,
I got the same problem.
My property:
“readOnlyValue”: false,
“readOnlyDefinition”: false,
However, when I tried to update its type from date to datetime, it would return:
{
“status”: “error”,
“message”: “Field ‘read_only_value’ cannot be modified for property ‘newcustomproperty’.”,
“correlationId”: “adfac5c9-ccdd-4490-98fa-5143a6dc3d6d”,
“requestId”: “3a82027a314f7252ca5919ab1e3f0a88”
}
Updating enumeration properties with read_only_value
If a property has the readOnlyValue flag set to true, the property can’t be updated manually, only a HubSpot internal process would be able to update the value.
If the property has readOnlyDefinition set to false, you could update the property settings and set that readOnlyValue flag to false as well, which would allow the property to be updated normally. Otherwise, if these are custom properties that are getting created with readOnlyValue and readOnlyDefinition both set to true, you’d need to contact support to have those properties updated. Normally those flags are only set for HubSpot system properties, so if you’re creating custom properties through the API, you’d want to make sure both of those flags are being set to false when the properties are created.