PDI · Question #72
AW Computing tracks order information in custom objects called order__c and order_Line_ c - Currently, all shipping information is stored in the order__c object. The company wants to expand Its…
The correct answer is C. Order_shipment_Group_c object and master-detail field to order_c and Order Line_c. To support split shipments where multiple order lines within a single order can go to different locations, a new junction object is needed to link specific order lines to specific shipments and also tie back to the main order.
Question
AW Computing tracks order information in custom objects called order__c and order_Line_ c - Currently, all shipping information is stored in the order__c object. The company wants to expand Its order application to support split shipments so that any number of order_Line__c records on a single order__c can be shipped to different locations. What should a developer add to fulfill this requirement?
Options
- AOrder_shipment_Group_c object and master-detail field on order_Line_c
- BOrder_shipment_Group_c object and master-detail field on order_c
- COrder_shipment_Group_c object and master-detail field to order_c and Order Line_c
- DOrder_shipment_Group_c object and master-detail field on order_shipment_Group_c
How the community answered
(17 responses)- A12% (2)
- C82% (14)
- D6% (1)
Why each option
To support split shipments where multiple order lines within a single order can go to different locations, a new junction object is needed to link specific order lines to specific shipments and also tie back to the main order.
A master-detail field only on `Order_Line__c` would link the shipment group to the order lines but wouldn't directly associate the shipment group with the parent `Order__c`, making it harder to manage shipments for a complete order.
A master-detail field only on `Order__c` would link the shipment group to the entire order, but wouldn't allow for specific `Order_Line__c` records to be assigned to different shipment groups within that order.
A new `Order_shipment_Group__c` object is necessary to represent a distinct shipment group. This new object needs a master-detail relationship to `Order__c` to link it to the parent order and another master-detail relationship to `Order_Line__c` to associate specific order lines with that particular shipment group, thereby allowing multiple lines from one order to be assigned to different shipment groups.
A master-detail field on `Order_shipment_Group__c` pointing to itself would create a self-referencing relationship, which is not suitable for linking shipment groups to orders and order lines.
Concept tested: Data modeling for many-to-many relationships
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdevlops.meta/sfdevlops/sfdevlops_api_field_types_md.htm
Topics
Community Discussion
No community discussion yet for this question.