Mule Salesforce connector Create Juntion Object using External IDs

0 votes
I have the following Objects and fields.

Object A: External Id (a_ext_id) and other fields Object B: Extrernal Id (b_ext_id) and other fields Custom Junction Object C: External id (c_ext_id) and fields a__c (lookup(a)), b__c (Master-Detail(b)) and Status__c

I would like to upsert records into Junction Object C without having to know the Salesforce Ids of Object A and Object B.

I just got it working with Partner WSDL.

Is there anyway to upsert in Mule without writing Java code?
Mar 3, 2022 in SalesForce by surbhi
• 3,820 points
639 views

1 answer to this question.

0 votes

This can be accomplished using external IDs. I would recommend using dataweave before connecting to Salesforce and submitting the parent objects' external ids as seen below: (assuming the external ID values are present in the payload).

{ c_ext_id: payload.cExt, // Value: C's external ID from payload a__r: { a_ext_id: payload.aExt // value: A's External ID from payload }, b__r:{ b_ext_id: payload.bExt // value: B's External ID from payload }, status__c: payload.status }


Hope this helps!

Check out the Salesforce admin training to learn more about it.

answered Mar 3, 2022 by CoolCoder
• 4,420 points

Related Questions In SalesForce

0 votes
0 answers

Salesforce Test Class - System.NullPointerException: Attempt to de-reference a null object

Salesforce Test Class - Facing - System.NullPointerException: ...READ MORE

Mar 1, 2022 in SalesForce by surbhi
• 3,820 points
2,053 views
0 votes
1 answer

Salesforce Test Class - System.NullPointerException: Attempt to de-reference a null object

Because testAccount.account is never set, it is ...READ MORE

answered Mar 2, 2022 in SalesForce by surbhi
• 3,820 points
2,824 views
0 votes
0 answers

Login into Salesforce android application using Trailhead account

I am beginner in salesforce. I am ...READ MORE

Mar 3, 2022 in SalesForce by surbhi
• 3,820 points
532 views
0 votes
0 answers

Can i create a sql table populated with Salesforce objects?

does Salesforce offer a way to obtain ...READ MORE

Mar 4, 2022 in SalesForce by surbhi
• 3,820 points
448 views
+2 votes
2 answers

Salesforce Interview questions

Here are some questions very important for ...READ MORE

answered Jan 11, 2019 in Career Counselling by Suresh
• 720 points
3,292 views
0 votes
1 answer

How to connect to salesforce from tableau?

Hi, follow these steps to connect to Salesforce: 1. ...READ MORE

answered Mar 25, 2019 in Tableau by Cherukuri
• 33,030 points
995 views
0 votes
1 answer

Power BI - Salesforce

Hi, Follow below steps: 1. Go to Data source. 2. ...READ MORE

answered Mar 25, 2019 in Power BI by Cherukuri
• 33,030 points
676 views
0 votes
2 answers

What is the best training for Salesforce ADM-201 Exam?

Hi @Vardhan, I took Edureka's Salesforce Online Training, ...READ MORE

answered Jun 3, 2021 in Others by Jaya
• 140 points

edited Dec 22, 2021 by Soumya 693 views
0 votes
1 answer

Can we create a record for Event object through lwc in Salesforce?

You can check list of supported obejcts ...READ MORE

answered Apr 5, 2022 in SalesForce by CoolCoder
• 4,420 points
2,061 views
0 votes
1 answer

How can we create salesforce developer account for salesforce essentials?

Developer.salesforce.com is where you can sign up ...READ MORE

answered Mar 3, 2022 in SalesForce by CoolCoder
• 4,420 points

edited Jun 19, 2023 by Khan Sarfaraz 535 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP