salesforce_push_entity_crud_mapping, entity reference is out of date

Created on 28 January 2021, almost 4 years ago
Updated 31 January 2024, 11 months ago

Problem/Motivation

Updates fail on form submission, though this is different across environments

Steps to reproduce

Create a new object on Salesforce and a fresh mapped content type. Map a field to sync or push Drupal to SF. Edit the data on the content type.

The data will be changed in Drupal, but not in Salesforce, and the drupal value will be rewritten with the original on the next pull.

It works fine using the "force push" button.

This works different across environments - my local and Acquia cloud.

Seems to be related to the referenced entity being cached.

On my local the retrieved mapped object

$mapped_object->drupal_entity->getDrupalEntity()

salesforce_push_entity_crud_mapping function in

modules/contrib/salesforce/modules/salesforce_push/salesforce_push.module

Has the data which has been input in the form. On Acquia, it does not have the updated values, though the updated values are correct in the database.

So, the form is setting the new value, but the old value is being pushed, and this causes a new sync which overwrites the value.

There's some cache issue, but I'm not sure how to clear this.

I have tried clearing the salesforce_mapped_object cache and the node cache, but neither works to clear the related cache. And I'm doing this within the module, so I won't want to do that on production.

Thank you.

πŸ’¬ Support request
Status

Closed: outdated

Version

4.0

Component

salesforce_push.module

Created by

πŸ‡ΊπŸ‡ΈUnited States dmgig

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