You need to sign in to do that
Don't have an account?
Adding multiple junction records at the same time
Hi there,
I have a custom object called Skill Set. Within each Skill Set there are 3 junction objects.
1. Expert At
2. Intermediate At
3. Novice At
The junction records are used to link Contact records to the Skill Set, and gives us visibility over which contacts have a speicfic level of skill. (Juntion objects have 2 lookup fields, 1 to Skill Set, 1 to Contact).
The only issue im finding with this is that I cant add more than 1 record at a time. E.g. If i had 10 contacts that were an Expert At Skill_A, i would need to create 10 records, one at a time. Also, if i have a Contact that has 10 skills, i have to create 10 junction records, one at a time. This can be quite time consuming.
Im wondering if its possible to create multiple junction records at the same time.
E.g. 1
Im in a Contact record and want to record that the person is an Expert At 10 skills.
I scroll to the "Expert At" reated list on the Contact and select Add New.
This returns a lookup window listing all Skills, with a checkbox next to each one, allowing me to select multiple skills.
I select 10 skills, and press OK.
This returns me to the Contact record, where i can see 10 junction Expert At related records, one for each Skill.
E.g. 2
Im in a Skill Set record, and want to add many contacts to the Skill as Experts At.
I scroll to the Expert At related list and select "Add New".
This allows me to search for and Add the 10 contacts.
I press Ok.
This returns me to the Skill Set record, where i can see 10 junction "Expert At" related records, one for each Contact.
Is this achieveable? If so, can anyone tell me how?
Many thanks. Much appreciated.
https://developer.salesforce.com/forums/?id=906F0000000DDQvIAO
Hope that helps.
The below should work
Trigger:
//Helper Class: