Skip to main content
Hi,

 

I need apex trigger code to go through the records in an object and set the value of field A equal to the value of field B.  I tried to do a workflow update action, but could not update the value of a lookup field. 

 

A little detail.  I have an object, CITY DETAILS, of city names.  The city name is the NAME field in the object.  The object also has county, region, market, zone and state.

 

I have another object, SNAPSHOT, that has sales by channel by city.  This report is populated from an Analytical Snapshot which pulls detail from the Opportunity object.  Unfortunately I can only set the report to two levels.  So I choose the smallest common demoninator, City, for the report.  I wanted to run a workflow rule that would use the City from the SNAPSHOT object as a link to the CITY DETAILS object so I could pull in the county, region, market, zone and state for summary reporting from SNAPSHOT.

 

Any ideas are greatly appreciated.

 

Thank you,

 

Rick
1 resposta