+ Start a Discussion

how to pull specific object record value when there is no relationship

Hi All,

I have Opportunity object having a field called Control(text). Another object Control with fields Control(Number) and State(text). Both are not related to eachother. Now my requirement is when opportunity control is updated, i need to search that value in Control object and pull specific state value on  to opportunity. Please suggest how to achieve this.

Use can Use SOSL 
Hi Chubby,

Write an on Update trigger on opporrtunity.
Make a list of controls from the opportunity (trigger.new)
Query the same list on the CONTROL object and insert into a map.
Use the map in the trigger.new for Loop and update the oppportunity.

Krishna Avva