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 in SalesForce by surbhi
• 3,810 points
48 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 }
answered Mar 3 by CoolCoder
• 4,360 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 in SalesForce by surbhi
• 3,810 points
399 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 in SalesForce by surbhi
• 3,810 points
263 views
0 votes
0 answers

Login into Salesforce android application using Trailhead account

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

Mar 3 in SalesForce by surbhi
• 3,810 points
54 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 in SalesForce by surbhi
• 3,810 points
54 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
1,864 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,010 points
302 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,010 points
181 views
0 votes
1 answer

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

Hi @Vardhan, I took Edureka's Salesforce Training that covers all ...READ MORE

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

edited Dec 22, 2021 by Soumya 215 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 in SalesForce by CoolCoder
• 4,360 points
165 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 in SalesForce by CoolCoder
• 4,360 points
68 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP