Set HubSpot user defined contact fields as Read Only


#1

We have an AccountId value associated with each of our Contacts. This information is imported from our internal systems into HubSpot environment. Is there a way to define any of our contact fields as Read Only, so that user cannot update value while viewing in HubSpot Contacts’ user interface?


#2

Hi @AEarly

This isn’t something that we currently support, as any property that can be modified through the API could also be modified through the UI. There is a flag in the property settings to make a property read-only, but that limits it to being updated by HubSpot, so it couldn’t be modified through the API or UI.

If you only need to access the property value through the API, it is possible to hide a property in the UI, by setting the property’s hidden attribute to true, but that does make the property completely hidden, so it couldn’t be viewed at all in the UI.


#3

Thank you @dadams.
I did not see a hidden flag available when viewing our user defined fields in ‘Contact Properties’. Is this an attribute that can only be set on a property via an API, or am I just in the wrong area to access this flag?
Thanks.


#4

The hidden attribute can only be set through the API, since setting it completely hides the property in the UI (so you wouldn’t be able to un-hide the property if you set that accidentally).


#5

Great info @dadams. One last question. If the hidden flag is set through the API, could the flag be reset/changed back through the API?


#6

Yep, the hidden flag doesn’t change anything other than whether or not the property shows up in the UI, so you can set it back to false through the API to have it show up again.


#7

We’d be looking for something very similar to this feature. It’d be a very welcome feature, and to be completely honest, something I’d expect out of any CRUD system that’s multi-user facing, and populated by an external system.

Are there any plans to implement this?

Thanks,
Ivan.


#8

We’re interested in a similar feature too: we would like to add custom properties to a contact, to show them (if needed) in the contact’s properties console, but not to permit the user to alter them in the HubSpot console.
Are there any plans to implement this?

Regards,
Leonardo


#9

@dadams,
I have noticed that in the creation method (POST to https://api.hubapi.com/properties/v1/contacts/properties) it is possible to indicate two boolean properties (readOnlyValue and readOnlyDefinition) in addition to the hidden flag. Since they’re not documented (yet?), I wonder if they are already available and “production-grade” and if they work as expected.

Thank you,

Leonardo


#10

@leonardo.scattola those options should not be used for custom properties, as those options will prevent any updates to those properties, including those coming from the Contacts or Contact Properties APIs.


#11

@dadams thank you for your quick answer. Just to double-check: I can declare an option as readOnly, thus preventing its update from the HS console (and via API too); however, if I declare a property with readOnlyDefinition set to true I won’t be able to further update it. Am I right?

Thank you,

Leonardo


#12

@leonardo.scattola both of those are correct, just keep in mind that a property with readOnlyDefinition set to true also cannot be deleted.


#13

Trying to set this hidden flag to true but keep getting this error:

{
“status”: “error”,
“message”: “Field ‘hidden’ cannot be modified for property ‘fulcrumid’.”,
“correlationId”: “40b88aec-a043-4f73-be21-c8719f03867a”,
“requestId”: “f8ecac522510a1bd7d930d1298a5a188”
}

Here is what I’m sending using a PUT action:

{
“name”: “fulcrumid”,
“label”: “FulcrumID”,
“description”: “”,
“groupName”: “contactinformation”,
“type”: “string”,
“fieldType”: “text”,
“deleted”: false,
“favorited”: false,
“favoritedOrder”: -1,
“calculated”: false,
“externalOptions”: false,
“displayMode”: “current_value”,
“formField”: true,
“displayOrder”: 0,
“hidden”: false
}


#14

@dadams

Thanks for your explanation of the readOnly, readOnlyDefinition, and hidden option of contact properties. I'm interested in creating a contact property with the hidden option to true and have its value update only via the API.

I tried to create a property named newcustomproperty with the hidden option set to true but here is the error message I get.

{
"status": "error",
"message": "Field 'hidden' cannot be modified for property 'newcustomproperty'."
}

Do you have any clue why?

Any chance I can unlock this one way or another?

Thanks for your help.


#15

Hi @Marc_Gandillon,

This topic is over 2 years old, so it's quite out of date. The hidden field was locked down a while ago in order to prevent the potential for abuse and/or a poor user experience.