# Associate Custom Object to Companies

**URL:** <https://community.hubspot.com/t/associate-custom-object-to-companies/32919>\
**Category:** HubSpot Ideas\
**Tags:** object\
**Created:** [March 9, 2021, 7:43pm UTC](https://community.hubspot.com/t/associate-custom-object-to-companies/32919 "2021-03-09T19:43:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JKlebanow](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jklebanow/32/7115_2.png) [@JKlebanow](https://community.hubspot.com/u/JKlebanow)\
**Post date:** [March 9, 2021, 7:43pm UTC](https://community.hubspot.com/t/associate-custom-object-to-companies/32919/1 "2021-03-09T19:43:48Z")

</div>

Currently, custom objects can only be associated with contacts. It would be great if I can associate to companies.

For example, if I have a custom object, “Virtual Events” and we focus on companies rather than contacts when it comes to invitations, I’d much rather see all of the companies affiliated rather than 50 associated contacts. Or best case scenario, both!

---

<div class="post-metadata">

**Author:** ![AndrewShaw](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/andrewshaw/32/25270_2.png) [@AndrewShaw](https://community.hubspot.com/u/AndrewShaw)\
**Post date:** [March 11, 2021, 11:51am UTC](https://community.hubspot.com/t/associate-custom-object-to-companies/32919/2 "2021-03-11T11:51:24Z")

</div>

I dont believe this is correct - you can associate custom objects to any of the object types by running the appropriate API

See documentation as following (scroll down on the Object Definition tab to find the “Create an association” section)

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fcrm-custom-objects-v3%2Fguide)**

---

<div class="post-metadata">

**Author:** ![JKlebanow](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jklebanow/32/7115_2.png) [@JKlebanow](https://community.hubspot.com/u/JKlebanow)\
**Post date:** [March 11, 2021, 5:35pm UTC](https://community.hubspot.com/t/associate-custom-object-to-companies/32919/3 "2021-03-11T17:35:52Z")

</div>

You’re absolutely right. I must have made an error when creating the custom objects through the API. Thanks for your feedback this will be very helpful and I’ll figure it out but now I know that it’s possible. **Third bullet point shows you’re right.**

 ![39356iE5044768785CFCFF.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/6/a6c587363d51ef18910cefc8847155de85fe7607.png)

---

<div class="post-metadata">

**Author:** ![AndrewShaw](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/andrewshaw/32/25270_2.png) [@AndrewShaw](https://community.hubspot.com/u/AndrewShaw)\
**Post date:** [March 12, 2021, 7:43am UTC](https://community.hubspot.com/t/associate-custom-object-to-companies/32919/4 "2021-03-12T07:43:43Z")

</div>

You’re welcome! Hope you get it sorted

---

<div class="post-metadata">

**Author:** ![elanashama](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/elanashama/32/48165_2.png) [@elanashama](https://community.hubspot.com/u/elanashama)\
**Post date:** [January 14, 2022, 9:07am UTC](https://community.hubspot.com/t/associate-custom-object-to-companies/32919/5 "2022-01-14T09:07:59Z")

</div>

I created a custom object named “event” and associated it with companies.

I now want to create a list of companies with X number of associated events, but HubSpot doesn’t offer a property for “number of associated events”. How can I know how many events, if any, are associated to any given company?
