CMS Development

ETaylor75
Contributor

Custom object to custom object association

SOLVE

I am trying to create a custom object that associates to another custom object but keep getting the following message:

 

{
"status": "error",
"message": "Invalid input JSON: Unable to infer object type from: SALES_AGGREGATOR_REP",
"correlationId": "2110c4e5-a614-4a08-96d9-c7d1d467436d"
}

 

I was able to create the object in the sandbox without an issues but now I am trying to do the same in production.  

0 Upvotes
1 Accepted solution
ETaylor75
Solution
Contributor

Custom object to custom object association

SOLVE

The solution we found works is as follows:
1. In the “Create Association” section add an association to an existing Custom Object (I.e., Company).
2. Add the association to the Custom Object you want. There will now be two associations.
3. Go to Custom Objects → select your object → Customize the form (bottom of the page) → you’ll see associations on the left-side. When you select them, they will appear at the bottom of the form. Unselect the association you want to hide (created in step 1 above).

View solution in original post

5 Replies 5
ETaylor75
Solution
Contributor

Custom object to custom object association

SOLVE

The solution we found works is as follows:
1. In the “Create Association” section add an association to an existing Custom Object (I.e., Company).
2. Add the association to the Custom Object you want. There will now be two associations.
3. Go to Custom Objects → select your object → Customize the form (bottom of the page) → you’ll see associations on the left-side. When you select them, they will appear at the bottom of the form. Unselect the association you want to hide (created in step 1 above).

dennisedson
HubSpot Product Team
HubSpot Product Team

Custom object to custom object association

SOLVE

@ETaylor75 

Mind posting the json that you are using?

Might also be worth replacing that name with the Custom Object type ID which can be found in the URL while in your portal and you are looking at the custom object

0 Upvotes
ETaylor75
Contributor

Custom object to custom object association

SOLVE

curl --request POST \
--url 'https://api.hubapi.com/crm/v3/schemas?hapikey=xxx' \
--header 'content-type: application/json' \
--data '{
"labels": {
"singular": "Sales Aggregator",
"plural": "Sales Aggregators"
},
"requiredProperties": [
"los_aggregator_id"
],
"searchableProperties": [
"los_aggregator_id"
],
"secondaryDisplayProperties": [
"los_aggregator_id"
],
"properties": [
{
"name": "los_aggregator_id",
"label": "LOS Aggregator ID",
"isPrimaryDisplayLabel": true,
"type": "number",
"fieldType": "number"
},
{
"name": "aggregator_name",
"label": "Aggregator Name",
"type": "string",
"fieldType": "text"
}
],
"associatedObjects": [
"SalesAggregatorRep"
],
"name": "Sales_Aggregator",
"primaryDisplayProperty": "los_aggregator_id",
"metaType": "PORTAL_SPECIFIC"
}'

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Custom object to custom object association

SOLVE

I would try replacing SalesAggregatorRep with the fully qualified name or with the custom object's id

 

 

0 Upvotes
VTorresRamos4
Participant

Custom object to custom object association

SOLVE

Hello, does this work for me? 

 

My custom objects is: "Group"

 

I already have this associations:

Tickets --- Contacts

Contacts---Group (custom object)

 

I need: 

Tickets --- Contacts---Group (custom object)

 

What happens:

In my conversation workflow, a ticket is created with the corresponding contact association. This contact has the objects "Company" and "Group" already associated on it.

The problem is that this created ticket is not associated with the custom object "Group".

 

What i'd like to have:

I'm not a developer, but what i need is a code or something that associates this ticket with my custom object "Group" (the "Group" is associated in my contact).

 

Can you help me to solve this problem, please?

0 Upvotes