Salesforce sync error on custom object and property sync fields

Hello.

We have a custom object in our HubSpot org that we are syncing to a custom object in Salesforce. The custom HubSpot object is associated to the Contact object, and I have created Property Sync fields on the custom object to store the Salesforce Lead ID and Salesforce Contact ID from the associated Contact.

When the synced Salesforce record synced to the HubSpot Contact is changed (Lead conversion, for example), I am receiving the following sync error:

salesforce_lead_id is a calculated property; its value cannot be set

salesforce_lead_id is the Property sync field, and I believe the error is due to a combination of the sync being configured as bi-directional and the fact that the Property Sync fields on the custom object are readonly in HubSpot.

I think a 1-way sync of the custom object from HubSpot to Salesforce would work fine for our use case, as we are only pushing data from HubSpot to Salesforce, but I don’t see an option for a 1-directional custom object sync.

Looking for a recommendation on how to address this. Thank you.

-Greg

Hi @GRohman
Thank you for reaching out to the Community!
I’d like to invite some community members who are subject matter experts to join this conversation.
@karstenkoehler @Nagarjoon @ArisudanTiwari - Would you be able to share any insights on this? Your expertise would be greatly appreciated.
Best,
Victor

Hi @GRohman , I dug into this a bit more and found a similar case in the community where someone ran into the same error trying to sync a system property. The key takeaway is that HubSpot system/read-only properties (like salesforce_lead_id) can’t be used directly as sync properties, since their values can’t be set or updated by integrations.

The recommended workaround is:

  • Create a custom property in HubSpot (for example, Sync Lead ID Copy).
  • Use a workflow to copy the value of salesforce_lead_id into that new property whenever it’s populated/updated.
  • Update your Salesforce sync to map against the new custom property instead of the system one.

This approach worked for others facing the same error and should allow you to get around the calculated property limitation while still keeping the Salesforce ID available for syncing.

Hope this helps!!

Best, Victor

Hi @Victor_Becerra

Thanks for the suggestion. I am now using workflow triggers to update text versions of the properties, and syncing those text properties to Salesforce. This has eliminated the error, but I’m now faced with a different challenge.

The custom object records are now continuously syncing to Salesforce every few minutes, even though no changes are being made to them. Looking at the Property History in HubSpot and Field History in Salesforce show no actual changes being made to any properties/fields… but the Last Modified and Last Salesforce Sync Date is perpetually updating.

I don’t know technically how property sync fields work… perhaps they continuously poll the associated record at an interval and update the property sync field, in which case that would cause the record to see a “change” and force a sync? Pure speculation, but curious if you (or anyone else) has ever experienced this issue.

Thanks.

-Greg

Hi Greg

Yeah this is a classic headache with the native HubSpot Salesforce sync and Property Sync fields. Your diagnosis is spot on. Property Sync fields are calculated and read only in HubSpot (Create sync properties that copy data to associated records), so when the bi directional sync tries to push back the updated salesforce_lead_id after a Lead conversion in Salesforce, HubSpot rejects it because it can’t write to that field.

The good news is that the custom object sync actually does support field level sync direction. In your field mappings for the custom object sync, you should be able to set each field to “Two way,” “Always use Salesforce,” or “Always use HubSpot” (Sync custom objects between HubSpot and Salesforce).
But here’s the catch, even setting the direction to “Always use HubSpot” on those Property Sync fields might not fully resolve it, because the sync engine may still attempt a write on those fields during certain events like Lead conversion.

What I’d actually recommend is removing the Property Sync fields from the Salesforce field mapping entirely, and instead creating regular single line text properties on the custom object to hold those Salesforce IDs. Then use a HubSpot workflow to copy the salesforce_lead_id and salesforce_contact_id from the associated Contact into those new custom properties whenever they change. That way your Salesforce sync maps to properties it can actually write to if needed, and you still have the ID data flowing through the custom object. It’s an extra step, but it completely sidesteps the calculated property limitation.

If you end up needing something more flexible for the HubSpot to Salesforce custom object sync going forward, tools like Stacksync (https://www.stacksync.com/) give you granular control over sync direction and field mapping at the individual field level without running into these read only property constraints. But the workflow approach should get you unblocked for now.

Hope that helps, let me know if you run into anything else with the field mapping setup.