Skip to main content

I'm just evaluating Zapier, can it create two Salesforce objects and link them together?

Lets say in Salesforce I have two custom objects

Foo__c

Bar__c

and Bar__c has a lookup or master detail field Bar__c.Foo__c that links it back to Foo__c.

Using Zapier can I create the two objects and link them together?

e.g.

Create new Foo__c record

Get the ID of that new Foo__c record

Create nmew Bar__c record

Fill in Bar__c.Foo__c to point back to the Foo__c record I just created

 

Thanks

Hi @codeulike, welcome to the Community! 👋

The Create Record Salesforce app action supports custom objects so you should be able to create new records and link them together.

The Create Record action would provide the ID for the custom object record it just created. So you’d need two separate Create Record actions in the Zap. One to create the Foo__c record and one to create the Bar__c record.

In the second Create Record action that creates the new Bar__c record, you would select the ID for the new Foo__c record (from the first Create Record action) using the Custom value option. I would have thought that should be enough to link the two records together. But if not, you could always use an Update Record action to update the relevant field on the Foo__c record that was created, with the ID of the Bar__c record that was created. Again, you’d need to do that using the Custom value option.

I’d recommend reviewing our add custom values to dropdown menu fields in Zaps guide for more details on how to use custom values in Zaps. 

Hope that helps to get you started. Please do let us know how you get on with this!


Thanks, I just tried it out and it works. Brilliant. In the second Create Record action you can use the Ids from the previous ones.

 

Also: apologies if this question got posted multiple times, I kept pressing ‘create’ on the forum and it seemed to be ignoring me but evidently the question did get posted….


Thanks for letting us know, @codeulike. I’m so pleased that did the trick! 😁🎉

No worries about the accidental posts, we’ve removed them. Your question was caught by the Spam filter initially, so that’s why it didn’t appear at first.