I'm using tokens to map [user:field-last-name] & [user:mail] to Salesforce field 'Last Name' and 'Email'. I'm trying to sync users to contacts. I get the following error. Note the incomplete token in the error message. Is this meaningful or not? Can anyone explain what this error means and how I can fix it?
Failed to update entity Antoine from Salesforce object sfobjectid. Error: Unknown data property [user.
thanks
Comments
Comment #1
kostajh commented@bisonbleu is this still occurring in the latest 7.x-3.x-dev?
Comment #2
bisonbleu commentedJust checked. It still does.
But as I now understand it (correct me if I'm wrong), this error occurs because of a misconfiguration that is itself based on a misunderstanding of the proper usage of tokens in the Salesforce field mappings wrapper UI. In plain words, don't use tokens when Direction needs to be set to sync.
The reciprocal: when using tokens to configure field mappings, Direction should always be set to Drupal to SF. Otherwise when editing/saving e.g. field Last Name on the mapped Salesforce object, salesforce_pull (the module) will generate the above error because it is trying to insert an updated value into a token - which doesn't make sense.
The Salesforce field mappings wrapper UI should be more helpful. As soon as one selects Tokens, Direction should automatically be set to the only possible option: Drupal to SF. The other 2 options really should be grayed out.
Comment #3
kostajh commentedThanks @bisonbleu. I updated the title to reflect the changes that should be made.
Comment #4
fabianx commentedClarifying title ...
Comment #5
amaisano commentedHow are people supposed to pull content from SF into fields, then? Such as Profile2 fields associated with a user account? Those fields are only available via tokens when creating a user-based SF Mapping...
Can the 'Related Entities' property be used somehow?
Please see related issue.
Comment #6
aaronbauman7.x is no longer supported