Unable to find company associated to deal in Workflow Custom Code action
SOLVE
Hello HubSpot team,
I am building a custom automation inside a Workflow Custom Code action to synchronise revenue share values from a partner company record into the company associated to a deal.
My intended flow is:
Read the partner company name from a field on the deal
Use HubSpot’s Search API to find the partner company record by name
Retrieve the company associated to the triggering deal
Copy key property values (e.g. revenue share type and amount) from the partner company into the associated company record
Originally I tried this by using “Edit Record” → “Associated Company” in the workflow, but the action failed to update the record, even though I could retrieve the values from the partner company data in the workflow.
I am now trying to update the associated company directly using HubSpot’s custom code action, using this approach:
The TARGET_ASSOCIATION_TYPE_ID should match the ID of the association label you are trying to target, which you can retrieve by doing a GET on the /crm/v4/associations/deal/company/labels endpoint.
Hope this helps!
✔️ Did this post help answer your query? Help the community by marking it as a solution.
The TARGET_ASSOCIATION_TYPE_ID should match the ID of the association label you are trying to target, which you can retrieve by doing a GET on the /crm/v4/associations/deal/company/labels endpoint.
Hope this helps!
✔️ Did this post help answer your query? Help the community by marking it as a solution.