I want to be able to save a single Drupal node and upsert multiple Salesforce objects.
It would be nice to be able to have a single Salesforce object map to multiple Drupal node types too.

Comments

EvanDonovan’s picture

This would be especially cool for integration with Ubercart store purchases (a la Ubercart Salesforce module).

Subscribing.

EvanDonovan’s picture

Possibly resolving #993766: Add native support for mapping of "foreign keys" for already mapped objects would get us part of the way to this. I am thinking that full one-to-many fieldmap support would be broader than the aforementioned issue, though, since it would entail creating a more flexible UI for mappings, which not only would not have the "sea of dropdowns", but would allow for adding additional objects that would be mapped off a Drupal object, using the Salesforce ID of the initially mapped object as their "foreign key" (for lookup or master-detail relationships). This would require AHAH.

This would eliminate the need for the OpportunityContactRole node which Ubercart/Salesforce Integration's uc_sf_order.module currently uses.

aaronbauman’s picture

aaronbauman’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Category: feature » task
Status: Closed (duplicate) » Needs review
StatusFileSize
new29.73 KB

Repurposing this issue as a task for D7.
I'm re-posting vasike's patch from #1056630: Bug: sf_user allows creating many-to-many relationships between SF and Drupal objects, even as it assumes they're one-to-one for review here, without changes.

EvanDonovan’s picture

Title: One-to-many fieldmaps » Provide ability to create one-to-many fieldmaps

Thanks, Aaron, for re-opening this. Now, Vasike, we can give this the attention it deserves, although I will be out the rest of the weekend.

vasike’s picture

any feedback for the patch?
i know this solution won't affect what it's already built and linked, it just add the "multi fieldmapping"

EvanDonovan’s picture

Sorry I haven't had any time to test yet. I've been having to get the 7.x Salesforce module production-ready for a client release shortly.

After that, I would like to investigate this. I am thinking possibly I may make a feature branch for these sort of things - or you could apply to your sandbox, and then I could pull...like a Github-like workflow.

vasike’s picture

so what should it be? a branch or a sandbox? what's the best solution for you?
do you need a new patch as there are some changes since the patch was built?

vasike’s picture

here is an updated patch, as the last one don't work anymore.
some testing would be nice

cellar door’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev

I just needed this for a project - going to try and port to the latest 7.3.x-dev . I just tried it through separate fieldmaps and it created duplicate content.

The use case I have is opportunities and Contact Roles. Technically separate fields but on the same node in Drupal.

levelos’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev

This patch is for a different branch of the module, and they have diverged considerably. Please create a new ticket if you need/want something similar in 3.x.

kostajh’s picture

Status: Needs review » Closed (won't fix)

Thank you for your efforts in working on this patch. We're not going to continue supporting 7.x-2.x however. See #2124817: 7.x-2.x and 6.x-2.x branches are no longer supported.