You need to sign in to do that
Don't have an account?
Upsert reference object
Hi all,
I'm a beginner with Salesforce platform, i have a small question with upsert object data:
Let's say i have 2 custom objects A and B. They have many - to - many relationship.
So i created a reference ojbect: ref_A_B which provides master-detail relationship to A and B.
I is very easy when i want to delete A or B, ref_A_B will be automatically deleted.
However, when i want to update A by adding or removing some B object inside it, i have to delete all of ref_A_B relating to A and B and then re-create new ones.
I know when we query database, we can use sub query to get ref object, can i apply the same method for update ?
Many thanks,
I don't believe you can change the master record of a child record once it's been created. So, once your junction object has been saved you cannot change which A or B it looks up to.
Here is an excerpt from the docs:
Two types of relationship field types can be defined. Here is a description of each:
Hope that helps!
~ Clint