
I have a custom object called 'Primary Domain' that has a 'Primary Domain Name' field and a custom 'Domain Score' text field. I also have a custom text field on my standard Lead object called 'Lead Domain' and a custom text field called 'Lead Score'.
For each Lead I would like the 'Lead Score' field to be populated with the 'Domain Score' value when the 'Lead Domain' text is equal to the 'Primary Domain Name'.
Essentially, I have multiple Leads that have domain fields that match a single custom 'Primary Domain' objects. I'm trying to lookup the 'Primary Domain' that matches up with the Lead's domain field and pull the score value from that 'Primary Domain' object into the score on the Leads.
Any suggestions would be helpful. I'm new to Apex Classes/Triggers, but I'm open to learning more to solve this issue. I tried to set up a lookup relationship between the Leads and the "Primary Domain' objects, but I wasn't able to grab the score value.
Thank you for taking the time to review this post and I look forward to reading your responses!
-Chris
6 answers

Thank you for the response, Gerry!
I've set up the lookup and formula fields that you suggested and it works swimmingly. The only issue I have is that I have to go into each Lead and edit the lookup field to select an associated 'Primary Domain' object. Is there any way to set up the lookup field to automatically associate the Leads to the 'Primary Domain' objects where the 'Primary Domain Name' and 'Lead Domain' match?