Loading

Field Service: ETL Connector Sync Fails with invalid_grant or INVALID_CROSS_REFERENCE_KEY on ServiceAppointment

Udgivelsesdato: Jul 29, 2026
Beskrivelse

Fivetran and other ETL connectors syncing Salesforce's `ServiceAppointment` object face two distinct failure modes:

1. **OAuth Expiry:** Auth fails due to an expired API token. Re-authenticate the Salesforce connection.
2. **`ParentRecordType` Field Error:** Sync queries fail on this specific field. Exclude `ParentRecordType` from the connector's schema select list.

Both can happen at once and must be fixed independently.

Løsning
Because both issues are independent, each must be addressed separately.

Fix 1 — Resolve OAuth Expiry (invalid_grant)

The API refresh token has expired. Re-authenticate the Salesforce connection in your ETL connector to generate a new token.

Fix 2 — Resolve INVALID_CROSS_REFERENCE_KEY on ServiceAppointment

The ParentRecordType field cannot be reliably queried. Follow these steps to exclude it:

  1. Open your ETL connector's query or schema configuration for the ServiceAppointment object.
  2. Remove ParentRecordType from the list of fields included in the sync query.
  3. Retain all other fields, including ParentRecordId, which remains queryable.
  4. Save the updated connector configuration.
  5. Trigger a manual sync and confirm it completes without the INVALID_CROSS_REFERENCE_KEY error.


NOTE: Removing ParentRecordType from the query does not affect the sync of any other ServiceAppointment fields. If your downstream pipeline requires the parent record type, derive it from ParentRecordId using a lookup in your destination system.
Vidensartikelnummer

005390210

 
Indlæser
Salesforce Help | Article