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

kostajh’s picture

Status: Active » Postponed (maintainer needs more info)

@bisonbleu is this still occurring in the latest 7.x-3.x-dev?

bisonbleu’s picture

Title: Only allow Drupal to SF sync when user selects "Tokens" in mapping form, add help docs in form » Broken token in error message
Status: Active » Postponed (maintainer needs more info)

Just checked. It still does.

Failed to update entity duid-0008 from Salesforce object 003i0000007CgwPAAS. Error: Unknown data property [user.

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.

kostajh’s picture

Title: Broken token in error message » Only allow Drupal to SF sync when user selects "Tokens" in mapping form, add help docs in form
Status: Postponed (maintainer needs more info) » Active

Thanks @bisonbleu. I updated the title to reflect the changes that should be made.

fabianx’s picture

Title: Broken token in error message » Allow only the "Drupal to SF sync" option when user selects "Tokens" in mapping form, disable sync and add help docs in form
Status: Postponed (maintainer needs more info) » Active

Clarifying title ...

amaisano’s picture

Issue summary: View changes
Related issues: +#1882342: Profile2 support

How 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.

aaronbauman’s picture

Component: Code » salesforce.module
Status: Active » Closed (won't fix)

7.x is no longer supported

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.