CRM

dmattauch
Colaborador líder

Custom Object Unique Identifier

resolver

Hi,

 

I created a custom object called shop, with a mandatory property called shop_name

 

The issue i have is that i can create as many shops i want with the same shop_name.

 

is there a way to do like in contact object, where you can't create a second contact with the same email address?

 

Many thanks

David

0 Me gusta
1 Soluciones aceptada
Bryantworks
Solución
Asesor destacado | Partner nivel Diamond
Asesor destacado | Partner nivel Diamond

Custom Object Unique Identifier

resolver

Hey @dmattauch,

 

This is not currently possible, as the only deduplication on any object outside of Contacts is their "ID".  

Chris Bryant | Your Dedicated HubSpot Expert

Ver la solución en mensaje original publicado

4 Respuestas 4
DigitalImpact
Participante | Partner nivel Diamond
Participante | Partner nivel Diamond

Custom Object Unique Identifier

resolver

David,

 

Did you set shop_name to require a unique value when you created it? That would stop you from being able to create multiple records where shop_name is the same.

 

If you're still using the API to create, hasUniqueValue would need to be set to true:

 

# DEPRECATION WARNING: HubSpot API (HAPI) keys are being deprecated, and will be removed from use on 30 November 2022.
curl --request POST \
--url 'https://api.hubapi.com/crm/v3/schemas?hapikey=[API KEY HERE]' \
--header 'content-type: application/json' \
--data '{
"labels": {
"singular": "Sample Object",
"plural": "Sample Objects"
},
"requiredProperties": [
"required_object_property"
],
"properties": [
{
"name": "required_object_property",
"label": "Required object property",
"isPrimaryDisplayLabel": true,
"hasUniqueValue": true
}
],
"associatedObjects": [
"CONTACT"
],
"name": "my_object",
"primaryDisplayProperty": "my_object_property",
"metaType": "PORTAL_SPECIFIC"
}'

0 Me gusta
kvlschaefer
Administrador de la comunidad
Administrador de la comunidad

Custom Object Unique Identifier

resolver

Thank you for sharing, @DigitalImpact


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Me gusta
CP-BWG
Colaborador

Custom Object Unique Identifier

resolver

@Bryantworks How does one set the key?  I am struggling with this as well.  Setting up a "users" custom object.  Was trying to use email as the sole required property and the primary display property, but it seems to let me put in new instances with a change in the case in an email address.  I verified contatacts don't allow that, so how does one set a primary key that increments, if email address doesnt work?

0 Me gusta
Bryantworks
Solución
Asesor destacado | Partner nivel Diamond
Asesor destacado | Partner nivel Diamond

Custom Object Unique Identifier

resolver

Hey @dmattauch,

 

This is not currently possible, as the only deduplication on any object outside of Contacts is their "ID".  

Chris Bryant | Your Dedicated HubSpot Expert