You need to sign in to do that
Don't have an account?
![Emily soares Emily soares](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Salesforce developer 1 - help with one question please
HI, i am practicing for Salesforce developer 1. I came across this question and the answer offered didnt make any sense to me.
The operation manager at a construction company uses a custom object called Machinery to manage the usage and maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different construction jobs, and track the dates and cost associated with each job. More than one piece of machinery can be assigned to one construction job. What should a developer do to meet these requirements?
The answer provided was n.3. I would have gone with n.2.
Would you be able to help me with this and explain the answer to this by any chance
Many thanks
The operation manager at a construction company uses a custom object called Machinery to manage the usage and maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different construction jobs, and track the dates and cost associated with each job. More than one piece of machinery can be assigned to one construction job. What should a developer do to meet these requirements?
- Create a lookup field on the machinery object to the construction job object
- Create a junction object with Master-Detail Relationship to both the machinery object and the construction job object.
- Create a lookup field on the construction job object to the machinery object
- Create a Master-Detail lookup field on the machinery object to the construction job object
The answer provided was n.3. I would have gone with n.2.
Would you be able to help me with this and explain the answer to this by any chance
Many thanks
Answer should be n.2 only, because according to this scenario "More than one piece of machinery can be assigned to one construction job" we have to gowith M-M relationship which can be possible through junction object approah only.
All Answers
Answer should be n.2 only, because according to this scenario "More than one piece of machinery can be assigned to one construction job" we have to gowith M-M relationship which can be possible through junction object approah only.
for me it cannot be a master-detail relationship, since deleting the job will cause deleting a machinery, which is not so good!
Im confusing about junction object and lookup relation
Lookup is a good choice, but it said "...and track the dates and cost associated with each job. More than one piece of machinery can be assigned to one construction job" so for me the first part means that each machinery can be "booked" for different job! /the same machinery for different job in different time/ and second part means different machineries for the one job!
So! For me the correct answer is N2: create junction object
as per my point of view: 1 construction job can have one or more machineries associated at a given point of time.
similarly 1 Machinery will be associated to ONLY 1 construction job at a given point of time.
this can be achieved by creating lookup relationship field on Machinery Object that opens up popup lookup list that shows Construction object records. (so you get to choose only 1 construction record)
why its not 2 & 4 (Master Detail relationship) : both objects should be loosely coupled and independent of each other, if Construction is deleted Machinery should NOT get deleted and vice-versa.
Please correct me if I am wrong..