You need to sign in to do that
Don't have an account?
brielea1984
Create n Number of Junction Object Records
I'm open to using either a trigger or Flow. I've been trying to do it as a Flow, but I'm getting stuck on getting it to loop through everything and can only get it to create a Demographic for the first Qualification in the list. I'm sure it's something in how to set the Loop and Assign. But I'm more familiar with Apex triggers, so I'm happy to go back to that.
This scenario uses 3 objects: Opportunity, Qualification, and Demographic.
Thanks!
This scenario uses 3 objects: Opportunity, Qualification, and Demographic.
- Qualifications have a picklist field called Default_Country__c
- On Opportunities, the user selects their country from a picklist field Country__c
- Demographics have a lookup to both Qualification and Opportunity.
Thanks!
Modify
Mark this as "SOLVED" if your query is Answered
Thanks & Regards,
Bhanu Mahesh Gadi
All Answers
Try below trigger on opportunity
Please check the API names and add the other required fields in the query and map them while creating the demographic record
NOTE: I have not compiled it. Please check for compilation errors. And let me know if you have any issues.
Mark this as "SOLVED" if your question is answered.
Thanks & Regards,
Bhanu Mahesh Gadi
whoops, didn't realize it was so small:
Compile Error: Incompatible value type Qualification_Library__c for Map<String, List<Qualification_Library__c>> at line 19 column 11.
Modify
Mark this as "SOLVED" if your query is Answered
Thanks & Regards,
Bhanu Mahesh Gadi
Thank you thank you thank you so much! I knew all of the pieces that needed to go into the trigger, but just couldn't get the mess in my head to figure out what needed to be written.
Thanks!