APIs & Integrations

Not applicable

Set HubSpot user defined contact fields as Read Only

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?

16 Replies 16
enrico_bianchet
Member

Set HubSpot user defined contact fields as Read Only

is something changed with the availability to set readOnly properties? based also on the users rights.
Sound very very strange that in a multi-user system like yours, that most of the times needed to populated by
an external system, there's no no way to manage seriously different rules per users.

am i in error?

Thanks

Enrico

0 Upvotes
WalshCheryl71
Contributor

Set HubSpot user defined contact fields as Read Only

We also need similar Functionality to make UI fields read only but make them available thru the API.

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Set HubSpot user defined contact fields as Read Only

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.

0 Upvotes
mgandi
Participant

Set HubSpot user defined contact fields as Read Only

@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.

0 Upvotes
Not applicable

Set HubSpot user defined contact fields as Read Only

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
}

0 Upvotes
lscattola
Participant

Set HubSpot user defined contact fields as Read Only

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

0 Upvotes
lscattola
Participant

Set HubSpot user defined contact fields as Read Only

@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

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Set HubSpot user defined contact fields as Read Only

@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.

0 Upvotes
lscattola
Participant

Set HubSpot user defined contact fields as Read Only

@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

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Set HubSpot user defined contact fields as Read Only

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

0 Upvotes
IvanD
Member

Set HubSpot user defined contact fields as Read Only

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.

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Set HubSpot user defined contact fields as Read Only

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.

0 Upvotes
Not applicable

Set HubSpot user defined contact fields as Read Only

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.

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Set HubSpot user defined contact fields as Read Only

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).

0 Upvotes
Not applicable

Set HubSpot user defined contact fields as Read Only

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?

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Set HubSpot user defined contact fields as Read Only

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.