
Scenario: Two Tables (Tasks and Workers), many-to-many relationship. A task can have many workers and a worker can work on many tasks. Except, I'm trying to establish this a little differently.
Instead of setting up the fields like:
tblTask: TaskID, WorkerID1, WorkerID2, WorkerID3
tblWorker: WorkerID
I'd like to setup tblTask like:
tblTask: TaskID, WorkerID (Pick-List)
tblWorker: WorkerID
Is this possible? If so, how?
3 réponses
No, not in the form of a Picklist! But what you'll need to do is to create another Custom Object called 'Task Worker' that'll have a Lookup/Master-Detail Relationship to the Task as well as the Worker. In that way you can acheive n-to-n relationship (aka many to many):
Doing this will bring a Related List labelled "Task Workers" on both the Task Detail Page as well as the Worker Detail Pages and that would allow you to create a Task Worker staying from either the Task record or while on the Worker record!