πŸ‡ΊπŸ‡¦Ukraine @knyshuk.vova

Account created on 5 July 2017, almost 7 years ago
#

Recent comments

πŸ‡ΊπŸ‡¦Ukraine knyshuk.vova

Marked the interval fields as required.

πŸ‡ΊπŸ‡¦Ukraine knyshuk.vova

The attached patch adds timestamp value push support by converting timestamp into supported by Salesforce format.

The code originally from the last patch in old discussion branch https://www.drupal.org/project/salesforce/issues/3122412#comment-14116705 πŸ› Mapped date fields are not properly syncing data. Closed: outdated ,
additionally fixed bugs
- 'date' salesforce type converting
- possibly missing requested drupal field definition (due to 'drupal_field_value' may have not a drupal field name value)

Tests coverage still needed.

πŸ‡ΊπŸ‡¦Ukraine knyshuk.vova

Confirm that solution from #5resolves the issue.

I agree that the example should be added to SalesforceExampleSubscriber

πŸ‡ΊπŸ‡¦Ukraine knyshuk.vova

added patch according to above comment

πŸ‡ΊπŸ‡¦Ukraine knyshuk.vova

@audiomason, nice job for finding such an issue. I have some adjustments for your patch.

It's better to use a setter method setEntityValue(), which indicates that change is intentional and controlled, rather than getting the reference of the value and change it directly.

  public function __construct(&$value, SalesforceMappingFieldPluginInterface $fieldPlugin, MappedObjectInterface $mappedObject) {
    $this->entityValue = &$value;
    // rest of code...
  }

  /**
   * Setter for entity value.
   *
   * @param mixed $value
   *   The value to be assigned.
   */
  public function setEntityValue($value) {
    $this->entityValue = $value;
  }
Production build 0.69.0 2024