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
hsyyid committed Oct 30, 2024
1 parent 76df113 commit e329583
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
@@ -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"] = record[possible_update_fields[0]]

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

0 comments on commit e329583

Please sign in to comment.