1

Not sure if I am going about this right but I am trying to create a picklist whose values are all values for another custom object.

Here is my setup.

I have a custom object called Courses which represents a number of courses that we offer. I also have a custom object named Group. Group is a group where a contact is assigned to. What I want is for a Group to have a multiselect list of Courses that a user or process could assign to a contact.

So for instance

Courses: Course A, Course B, Course C


Groups: Group 1, Group 2, Group 3

Group 1 Courses: Course A, Course B
Group 2 Courses: Course B, Course C

Contacts:

Joe Smith -> Group 1
Jill Misth -> Group 2

I will have a process that when a Contact is created or Updated and assigned to a particular group will go to the Group object, lookup the list of courses for that group and then assign the Course to the Contact.

Is this possible or am I going about this all wrong?

Thanks

2

If I had to design this, I would have done it this way.

  1. Create a relationship between Course and Group objects.

    Have a lookup on Course object to the Group. This will allow you to associate any particular Course to any particular Group. Consider this as when you are on a Group record, you will see a related list of all Courses available for that Group

  2. Create a relationship between Contact and Group.

    Have a lookup on Contact object to Group. This way you assign the Contact a particular Group, and in turn the related Courses in that Group.

Now, if you need to have only some of the courses assigned from that Group, you can additionally say create another related object on Contact, say named "Assigned Courses", which will provide you the Group info and the Courses selected from that Group.

The advantage -- This way you utilize a relational model as seems to be your use case, instead of maintaining values in picklists which could change over time whenever say Courses are added, thus requiring change management.

1
  • 1
    +1 I was about to suggest same Nov 30 '18 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.