Instead of kludging the ->salesforce_pull property onto the entity object, salesforce_pull should implement hook_salesforce_push_entity_allowed and a mechanism of managing which entities should not be pulled or pushed.

Technically this is an API change, but since this property is for internal use only and not documented, the change's impact will be limited.
The documented API will not change.

Patch forthcoming, as this merits discussion before getting committed.

Comments

aaronbauman’s picture

Title: Proposed change: stop using kludge ->salesforce_pull property » Proposed change: stop using kludge ->salesforce_pull property in salesforce_push
Status: Active » Needs review
StatusFileSize
new1.62 KB

Here's a basic change.
It's not practical to remove this property entirely, because we don't have reliable identifying information for entity create operations.
So, salesforce_pull still uses the property internally, but salesforce_push doesn't have to bother with it.

Not as big a change I was expecting.
I'll leave this open for a couple days for comments, then commit it.

tauno’s picture

Status: Needs review » Postponed (maintainer needs more info)

Looks like just a different way of doing the same thing. Not sure there's value in implementing our own hook rather than just doing the check in the appropriate place. Is there another reason to make this change?

aaronbauman’s picture

I guess the only reason is to better encapsulate SF Pull's behavior.
Yes, it's another way to do the same thing, but it makes salesforce_push_entity_crud() a bit cleaner.

aaronbauman’s picture

Status: Postponed (maintainer needs more info) » 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.