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
divya1234divya1234 

How to create a multi-select lookup relationship between two custom objects? Between custom and standard object

-2
I have a Requirement to select multiple user on my lookup field . I have one custom Object called Provisioning where i have lookup field for user object . Current functionally is if i select the user record it will update the field on user object via trigger. New Requirement is it should allow user to select Multiple user on user lookup field . how i ca achieve this with VF page or Lightning Component. If i am creating a VF page how do I add the selected values of lookup as individual rows in parent page??
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi divya,
You can use junction object for this requirement and create many to many relation between these objects so that you will be able to relate a provisioning record to multiple users.
Please refer below link which might help you further.
https://help.salesforce.com/articleView?id=relationships_manytomany.htm&type=5
https://www.jitendrazaa.com/blog/salesforce/deep-drive-in-junction-object-create-many-to-many-relationship-in-salesforce/

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards