Duplicate User Creation Error During SF PULL when Mapping ID differs

Created on 21 September 2022, over 2 years ago
Updated 31 January 2024, 11 months ago

Problem/Motivation

When Salesforce mapping ID changes for profiles, getting user duplication error when SF pull running to sync the profiles which is NOT considering existing profile with different mapping id and instead updating profile, trying to create new profile

Steps to reproduce

Created two SF mappings for Push and pull respectively.
Create a user profile from Drupal which create the account in Salesforce using SF push mapping.
Update the same profile from Salesforce interface and pull the updated data to Drupal using SF pull mapping Cron URL. During this time I am getting Duplicate user entry error.
DBlog Error: Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'test@test.com-en' for key 'user__name': INSERT INTO {users_field_data} (uid, langcode, preferred_langcode, preferred_admin_langcode, name, pass, mail, timezone, status, created, changed, access, login, init, default_langcode) VALUES ......

Please let me know if this issue is already reported and the fixes are available.

Proposed resolution

Handle both PUSH and PULL using same mapping which is resolving this issue. But still wanted to know, SF will handle profile syncs for multiple mapping as described in problem statement?

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: outdated

Version

4.3

Component

salesforce_pull.module

Created by

🇮🇳India jnavane

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States AaronBauman Philadelphia

    I'm doing some cleanup on unsupported branches.
    Please re-open this issue and update the version to 5.0.x-dev if this issue is still applicable to the latest release.

Production build 0.71.5 2024