Questions tagged [junction-object]

In Salesforce, a Junction Object is a custom object with two master-detail relationships to two different record types. It is used to represent a many-to-many relationship in which several junction objects can link one instance of a record to many children, and each child can equally be linked to many parents.

Filter by
Sorted by
Tagged with
3
votes
2answers
84 views

How to avoid duplicate look up combination in many to many realtionship?

I am trying to learn many to many relationships for salesforce objects, I was able to implement it using a junction object where there are two master-detail relationships. But it causes a duplicate ...
0
votes
1answer
18 views

Is there a standard way to add junction objects to a parent using the parent's default record edit form?

I have Cases objects in my Salesforce instance, along with Recommendation objects. For each case I would like to have multiple Recommendations. The Recommendations are not unique to the case, so the ...
0
votes
1answer
14 views

SOQL Query for Account - Junction - Account

I need to join Account (type = person account) --> Junction Object --> Account (type = business account) We have person accounts enabled on our org. I can easily write what I need in SQL, but ...
1
vote
1answer
54 views

URGENT - Related list should not display non accessible records

I have created a junction object[XYZ] with object ABC and Contact as masters. OWD for ABC and Contact is PRIVATE, no sharing rule for both objects. Profile level access does not have View All / Modify ...
0
votes
0answers
24 views

Junction object between tasks and custom object

Currently, our emails with contacts are logged as tasks (this is good). The task logs on the account and contact (this is also good). Our contacts are also related to a custom object, 'customers,' ...
0
votes
1answer
38 views

Use case for parts and repairs

I have a use case that requires calculating "repair costs" on Maintenance Request Objects (I am calling it MR 2). The partname and partcost are fields in a Parts Object. There are about 100 ...
0
votes
1answer
48 views

Add products on custom objects vs. junction object - please help!

My organization awards scholarships. I have two objects: scholarship and recipient. I need to be able to track the awards that each recipient receives, without creating a new record each time the same ...
0
votes
0answers
27 views

How to add multiple products [standard object] to a custom object

I have an object called Showroom Products which is related to another object called Product. There is a look up relationship between Showroom Products and Product. There is also a look-up relationship ...
0
votes
1answer
62 views

Update related list view

I have a custom object with a master-detail relationship to some standard objects through a junction object. On the related list view on the standard object, I would like to: Remove the checkboxes on ...
0
votes
1answer
69 views

Dealing with Name/Auto Number on Junction object records

I have a scenario where I am trying to be able to list multiple Tools that were used on a Job Site. I have two custom object records, Tools and Job Sites, and a third Junction object, called 'Tools ...
0
votes
0answers
34 views

How to calculate Weekends and Different month total value?

I have a scenario to caluculate total leave month wise while employee apply leave. Following scenario need to be cover: If you have taken leave on Friday and apply leave for the next five week days, ...
0
votes
0answers
68 views

How to import records of 2 parent objects and a junction object inbetween them using Data:Tree in SFDX?

I created some test data in a scratch org for a Trailhead project and i wanted to try to export it and then import it into my Devhub. I ran three different export queries and then created my own plan ....
1
vote
2answers
100 views

Associate a Case with Multiple Locations

I need to give users the ability to create a case that's associated with multiple locations. There's currently a Master-Detail relationship between Account and Location. When a user is creating a case ...
0
votes
1answer
624 views

Using Junction object to display related list

Problem: I need to create a way to view two related fields on a given record between two different custom objects. I have looked up junction objects and it seems that this will be the best solution. ...
1
vote
2answers
245 views

Can you create a 3 way many to many relationship between objects?

I want to create a custom object called Groups. I then want to create a M2M Relationship between Groups and Accounts. Then I want to Create a M2M relationship between Groups and Contacts. Is there a ...
0
votes
1answer
34 views

Changing junction object name

I have an existing junction object that is named poorly and is causing a lot of confusion. I wish to change the name of this object and move the changes to production. Can you please let me know ...
-2
votes
1answer
157 views

How to display contacts as they relate to accounts on a custom object [closed]

I am a newbie in salesforce I have a custom object say X which has master detail relationship with Account. Now I want to display the list of contacts related to account under the custom object X. ...
0
votes
1answer
102 views

How can I map two queries from junction objects into an instance of a custom object class that I need to return?

I need my getUser method to return an instance of the custom object class UserCTI. I need make two queries and map their results into the UserCTI object, or I can make a subquery within the primary ...
0
votes
0answers
18 views

How can I return a Custom Object with a List of Parent Data from querying the Junction Object? [duplicate]

I am new to Apex trying to do some practice assignments and have gotten stuck on this junction object query. Task: Edit the current getUser() method to do the following: Return a custom object (that ...
3
votes
0answers
194 views

How to use sfdx force:data:tree:export to export CPQ Bundle Product for import into a new scratch org?

For starters I am trying to only export set of Products, Feature and Options that comprise a single bundle Product, but having problems because Product Option object has two lookup relationships to ...
0
votes
1answer
40 views

is it possible to get the parents old value in trigger update on junction object

i have a issue in retrieving the old value of parents record onthe junction object update scenario, do anyone have come across this scenario, please throw lights. Junction__c oldlrj = [SELECT Id, ...
0
votes
0answers
69 views

How master-detail records are synchronized/accessible in junction object?

I have a Juction object CaseJiraItemAssociation__c which is have two master-detail relationship (on Case__c and JiraItem__c custom objects) and I have one outbound message (end point) on JiraItem__c ...
0
votes
0answers
144 views

Inserting record on Junction object with formula fields

I have Junction object called Agreement Scope which has two Master Detail relationships with Account and Agreement. We are assigning Account and Agreement in the lightning components Apex Controller ...
0
votes
2answers
109 views

Filter records using junction object using SOQL query

I have a many to many relationship with 3 objects Position, Candidate, Job Application(Junction Object). I wanted to retrieve all the positions applied by a particular candidate and also the positions ...
-1
votes
1answer
500 views

TRIGGER to update related records on Junction object

My scenario is One candidate can have a multiple Job application, custom objects are candidate__c(lookup to job application) Job_Openings__c(lookup to Job application) Job_Applications__c(junction ...
0
votes
1answer
56 views

Hide a Field in junction object

In Account Object, I have 2 different record type - type1 and type2. There is a Junction Object call Associated Location between Locations and Accounts and I want to hide a checkbox field in ...
2
votes
2answers
401 views

DML Insert List of Child Records and Junction Records in a single DML Statement

I've 3 Custom Objects (List) : List <C1> (Child) fields : Id, Name List <C2> (Child) fields : Id, Name List <C3> (Junction) fields : IdC1, IdC2, Name I was able to get C1 IDS ...
1
vote
1answer
576 views

Upsert in junction records without duplicate creation

Have a junction object that is a many to many relationship between two obejcts - Account and Publisher. As mentioned in the documentation I set the key in the Is there an easy way to upsert junction ...
1
vote
1answer
336 views

Many to Many Relationship on OpportunityLineItem, and similar Junction Objects.

I'm trying to add special characteristics that are not entirely products, so I thought, that the best way would be to make a many-many relationship between the Opportunity Line Products, Quote ...
0
votes
0answers
77 views

How to limit lookups in many-to-many relationship based on related record attributes?

I have created a many-to-many relation between Contact and Skill, a custom object that represents a contact's skills. A contact can be one of two different record types, Type A and Type B. I want to ...
1
vote
2answers
339 views

Querying to fetch data from junction object and Accounts

I have a junction object called "JIRA_Data" and its linked/ related to Accounts. How do I query to fetch data from this relationship. I am trying to extract id,type from Account object and Name from ...
0
votes
2answers
468 views

I need to update a checkbox on account object to true if there is at least 1 custom object picklist vaule selected

I need to update a checkbox on account object to true if there is at least 1 custom object picklist vaule selected, so even if the picklist value changes on related projects then the account checkbox ...
-2
votes
1answer
148 views

How to get parent field values based on linked junction object

I have 3 objects. Platform and documents are parent and junction platform is child. Platform Junction platform Doc (junction object) documents I need all the documents linked to the platform. For ...
2
votes
1answer
271 views

Incorrect Documentation - You can't create outbound messages for workflow rules on junction objects

In Workflow Considerations documentation, Workflow Limitations section, it has been specified that. You can't create outbound messages for workflow rules on junction objects. I have created a ...
-1
votes
1answer
235 views

Update Priority of Cases related to another Case through a Junction Object

We have a junction object called "Related_Development_Cases__c" that has 2 many-to-many relationships to the Case object through 2 Case lookup fields (Support_Case__c and Development_Case__c). We ...
0
votes
1answer
202 views

How do I automatically update fields on a custom object with information from Events?

and thank you all for taking the time to read my question! Here's what we're trying to accomplish: Automatically populate a "parent" object, Project, with information from an Event used to schedule ...
0
votes
1answer
638 views

Can a List View be made that filters on Junction Objects?

My organization associates Users with Contacts. We have a custom junction object to establish a many-to-many relationship between Users and Contacts. We want to allow Users to filter the Contact list ...
1
vote
1answer
295 views

Create related object of certain Record Type on Object [closed]

We are using the case object to different case type, due to that we have a lot of different record types. For a case it is possible to have a related Product this is done with a junction object. So ...
-2
votes
1answer
44 views

How to setup junction pointing 2x to contacts to delete child records when master is deleted?

The contacts in our SF instance can give gifts from other contacts or receive gifts from contacts. I need a way to represent who gave to whom and if a contact is deleted any record with the taker and ...
0
votes
1answer
40 views

How to setup giver and receivers with junction object

The contacts in our SF instance can give gifts from other contacts or receive gifts from contacts. I need a way to represent who gave to whom. Would the following scenario work? Create an object "...
-2
votes
2answers
765 views

How to implement Trigger on junction object to update field on contact

I have a junction object called contact_role__c between contact and a custom object called property__c. I need to update a field on contact object whenever a new property__c is created. This is what i ...
0
votes
0answers
437 views

Deleting junction objects

I have a use case where the Master object can only have one child object at a time, so when a user selects a new child object I need to delete the original junction object via Apex and create a new ...
1
vote
1answer
695 views

How to update contact object from related junction object?

I created a junction object called Sponsorship__c and have a many-to-many relationship. It is related to Contact through a master-detail relationship and I have another custom object called ...
1
vote
1answer
210 views

Junction Object between same SObject Type (b-directional siblings)

What is the best way to implement a Junction object that connects two of the same SObject Types? I have a data-structure that sort of represents a sibling relationship. Each Treatment__c has 0 or ...
1
vote
2answers
1k views

What is security access for child record when master is private

There is one junction object in which one master object has owd public access and one master object has private access
1
vote
0answers
292 views

SOQL / Apex To Find Duplicates On A Junction Object ( OpportunityContactRole )

I have a rogue trigger that inserts duplicate OpportunityContactRoles when it shouldn't. I can't find the error in my code, but it's not a high-volume problem. It is, however, a daily low-volume ...
0
votes
2answers
920 views

I cannot create child object to junction object

I have a junction object(JuncObj) with a custom object(ParentObj1) and contact as the masters. I've created a separate obj(NewChildObj) that is supposed to be a child object of JuncObj. When I create ...
1
vote
0answers
30 views

External Junction Object Rearchitecture

Currently we have a junction object between a standard object and a custom object. Our SOQL queries are pretty straight forward for example SELECT Id, Date, Contact__r.FirstName, Contact__r.LastName,...
0
votes
2answers
328 views

Need help in fetching the details using junction object

I have 3 objects Object 1 and Object 3 are Connected through a Junction Object Object 2 Obj1 Record Obj2 Record Obj3 Record Rate 1234 ...
2
votes
1answer
100 views

Uploading relationships between two objects linked with a junction object

I am setting up an insurance brokerage CRM where a Contact can have multiple Group Policies and a Group Policy can have multiple Contacts. I have these two objects linked with a junction object, ...