# FromObjectType and ToObjectType must be specified to retrieve association types

**URL:** <https://community.cdata.com/t/fromobjecttype-and-toobjecttype-must-be-specified-to-retrieve-association-types/345>\
**Category:** Data Sources\
**Tags:** article, cdata-sync, hubspot\
**Created:** [August 18, 2023, 9:40pm UTC](https://community.cdata.com/t/fromobjecttype-and-toobjecttype-must-be-specified-to-retrieve-association-types/345 "2023-08-18T21:40:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@Omar](https://community.cdata.com/u/Omar)\
**Post date:** [August 18, 2023, 9:40pm UTC](https://community.cdata.com/t/fromobjecttype-and-toobjecttype-must-be-specified-to-retrieve-association-types/345/1 "2023-08-18T21:40:21Z")

</div>

This means these two filters are not defined in your replicate query, you’ll need to define these according to documentation listed below:&nbsp;  
[https://cdn.cdata.com/help/DHJ/ado/pg\_hubspotv3table-associationstypes.htm](https://cdn.cdata.com/help/DHJ/ado/pg_hubspotv3table-associationstypes.htm)

An example of a Sync task with this query syntax might look like the following:

REPLICATE AssociationsTypes SELECT \* FROM AssociationsTypes WHERE (FromObjectType = ‘companies’) AND (ToObjectType = ‘deals’)

Further API documentation explaining what these filters are and why they are required can be found here:

> **[Associate records - HubSpot docs](https://developers.hubspot.com/docs/api-reference/latest/crm/associations/associate-records/guide)**
>
> Use the associations API to create, manage, and remove associations between CRM records.
