function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matthew StaffordMatthew Stafford 

Link one custom object to records in another

Hello everyone, I am trying to work out the best way to achieve the following:
I have 2 custom objects Jobs and Job Types. I would like to enable multiple job types to be linked to any job. I can link the 2 objects, which enables me to use the 'New Job Types' button to create a new job type, but I only want to be able to select from a predetermined list of Job Types and multiples of those job types.
For example: Job 001 is created and assigned to an engineer. He does the job and need to select the job types he has completed (1 x Replace power supply / 3 x reset system / 2 x Firmware updates).
I was thinking a multi-select picklist, but this would only permit 1 x of each selection. I would like to see this as related list on the Jobs object also and have a button to 'Select' job types, instead of creating new Job Type.
What is the best way to go about this? I suspect I may need to create a junction object perhaps?
Any help would be greatly appreciated.
Thanks
Matthew
Lalit JainLalit Jain
Create a child object as Job type having picklistfield with the list of all the Job Types and a lookup field to to Jobs object. You can create n number of Job Types from the related list on Jobs record and can also create the the same job type record again if required. You can add additional fields to add additional information related to each job type.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.