Skip to content

Commit

Permalink
HGI-6733: add externalId to target state if available
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyyid committed Oct 30, 2024
1 parent 76df113 commit 24bd663
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions target_salesforce_v3/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,11 @@ def upsert_record(self, record, context):
if field in record:
possible_update_fields.append(field)

# grab the externalId we should use for the state
# TODO: in most cases this would be 1, but what if there's more?
if len(possible_update_fields) > 0:
state_updates["externalId"] = possible_update_fields[0]

if record.get("Id"):
fields = ["Id"]
else:
Expand Down

0 comments on commit 24bd663

Please sign in to comment.