+ Start a Discussion
Micky MMicky M 

S 2 S

Hi all has anyone does anyone know how to copy over the parent account of an opportunity using salesforce to salesforce?

 

if an opporunity is created it gets sent over to the partner org but i need its parent account to come over as well and have them linked. Has anyone else done this?

 

Cheers

MrTheTylerMrTheTyler

Hi Micky,

 

  Yes, we've done this before.  Basically we use a text field on the child object that holds the parentID.  The trigger on the other end of SF2SF looks to see if the record that was created exists in the SF2SF connection table.  If so, we do a lookup using the text value as the parentID and update the lookup field accordingly.

 

 

Kind Regards,

 

Tyler Hudson
Contact Us - We Can Help!

Salesforce Superheroes
------------------------------
help@salesforcesuperheroes.com
www.salesforcesuperheroes.com
1-888-407-9578 x123

Micky MMicky M

Hi thanks, I've tried this approach, i pull out the accound id's from the opporutinties then select the parent accounts from salesforce and push them over to the partner org then push over the opportunities. The problem it seems to have is that the accounts arent pushed over before the opportunities. So it fails as there's no parent ID to link to.

 

I've split the push accounts and push opportunities code to different methods as i thought calling push accounts first would finish and then once the opps were pushed over they'd have an account to link to ... but it doesnt seem to work like that.

 

Has anyone any ideas?

 

Thanks 

MrTheTylerMrTheTyler

Good Morning Micky,

 

  We saw the same issue - that we could not assume that objects shared would arrive in the same order (FIFO) or vice-versa (LIFO).  Therefore, triggers were written on both objects on the receiving end to ensure linkages would happen.

 

 

Kind Regards,

 

Tyler Hudson
Contact Us - We Can Help!

Salesforce Superheroes
------------------------------
help@salesforcesuperheroes.com
www.salesforcesuperheroes.com
1-888-407-9578 x123

Micky MMicky M

Hmm yeah it is a strange one, how did you do the trigger on in your other salesforce org then? can you queery or synch records in some way?