PDI · Question #226
A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object…
The correct answer is B. Junction object between Bug__c and Account. The requirement is to establish a many-to-many relationship between the Account object and a custom Bug__c object, where multiple companies can report multiple bugs and vice versa.
Question
A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c. As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able to report multiple bugs and bugs can also be reported by multiple companies. What is needed to allow this reporting?
Options
- ARoll-up summary field of Bug__c on Account
- BJunction object between Bug__c and Account
- CLookup field on Bug__c to Account
- DMaster-detail field on Bug__c to Account
How the community answered
(58 responses)- A9% (5)
- B84% (49)
- C5% (3)
- D2% (1)
Why each option
The requirement is to establish a many-to-many relationship between the Account object and a custom Bug__c object, where multiple companies can report multiple bugs and vice versa.
A roll-up summary field aggregates data from child records to a parent in a master-detail relationship and does not create a many-to-many link.
A junction object is the standard and most effective way in Salesforce to implement a many-to-many relationship between two objects. It links two master-detail relationships, acting as an intermediary to connect multiple records from each parent object.
A lookup field on Bug__c to Account would only create a one-to-many relationship, where each bug can only be associated with one account, failing the requirement for multiple companies to report a single bug.
A master-detail field on Bug__c to Account also creates a one-to-many relationship, making Bug__c dependent on Account, and does not support the many-to-many scenario.
Concept tested: Many-to-many relationships and junction objects
Source: https://help.salesforce.com/s/articleView?id=sf.dev_schema_many_to_many_relationships.htm&type=5
Topics
Community Discussion
No community discussion yet for this question.