cancel
Showing results for 
Search instead for 
Did you mean: 

Loading records of object having two lookup fields on the same object(Contact)

prakarshjain510
New Contributor II

There is one object relationship. The object has two lookup relationship both on the Contact.
We are trying to load relationship record data and relate that record with both the contacts. We have external ids field created on Contacts which are being used to load the data. But they are not getting loaded.

When we pass salesforce id directly then the record gets created.

Relationship(Child)->Contact1(Parent), Contact2(Parent)

In the upsert snap, we are using contact1 field as the related object. And while mapping we are passing salesforce id of Contact2 field, but the record is not getting created.

If anyone has implemented similar kind of functionality please let me know the steps.

Thanks!

7 REPLIES 7

Thanks @bojanvelevski
After adding validate and execute, I am getting the following error in the poller snap -
image

This is the relationship mapper:

image

Not sure, why this error is coming though, as in the Relationship Upsert Snap, I am using contact as the related object and the external id field created on the Contact object.

image

Thanks!

prakarshjain510
New Contributor II

I was able to resolve the error.

Had to use the correct relationship field API Name which was something else and not Contact__r.

Thanks a lot for the help @bojanvelevski @darshthakkar

Glad you were able to resolve the error. Yeah, it has happened with me before that I used a wrong mapping for salesforce fields.

Salesforce fields have a double underscore “__” and I was going ahead with a single “_”; that was not allowing me to ingest any values. Second time, I was trying to insert a name and salesforce could ONLY accept an ID for a given field, I’ve had my part of resolving those errors previously.

Rationale behind not highlighting these facts before was to check and validate if there were any erros in the pipeline design/development, the next step would anyway have been checking the mapping which you did so all good.