1

I created a custom object Goal and fields in it. one of the field Assigned_To__c is a lookup for users. I got a requirement to select multiple users and roles with the Assigned_To field. which will allow me to assign same goal to multiple users at once.

I followed some sfdc dev forums and they said, i have to create a lightning component.Please help me with the issue. Thanks in advance.

1 Answer 1

2

What you are looking for is commonly referred to as a junction object representing the many-to-many relationship here.

Here is an example from trailhead about a junction object being used in a job posting scenario for a recruiting application: https://trailhead.salesforce.com/en/content/learn/projects/build-a-data-model-for-a-recruiting-app/junction-object-job-postings

Your object would have two lookup fields on it. One to Goal and one to User. These junction records allow you to link one goal to multiple users and similarly one user could be associated to one or more goals. If you need to represent a user's role related to the goal, a third field on this junction record could be added to capture Role.

You might name this object Goal Assignments.

Contrary to what you may have seen in a forum, you do not need a lightning component to implement this pattern.

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.