- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
12-19-2012 03:04 PM
Hi community ,
Let me give backround about my requirement.
I need to populate a Look up field with the campaign Name (The campaign name is already existing on opportunity this will keep changing when a new campaign member added to the contact(In retrun this contact will be related to the opportunity)) when the stage on opportunity set to closed won or Closed lost the specific name in the Campaign Name should be populated in the Lookup field . For the new records it works fine by batch process . but for populating the existing records i need a process.
Do any body have ideas or come across this .
Thanks in advance for your time and help.
12-19-2012 11:55 PM
I am not sure if you have taken the Trigger approach, if not you can have after/before update trigger(with/without batch process) and add the logic to achieve the requirement you have.
12-20-2012 03:57 PM
Thanks for the reply ,
Actually we have 3 text fields on opportunity, we replaced them through lookup fields, now we want to do datacleansing and get the legasy data also. here our real problem starts.
It is when stage is set to closed the value in the 2nd field will be populated in the 3rd one . 2 nd will keep updating based on the related fields . but 3rd will remain unchange until the stage changes.
since 2nd one is keep on changing we can not rely on that for legacy data. But from the opportunity history we can find when the stage is set to closed, I found this after my research. My idea is after getting that date of stage change to closed and compare with when 2nd value history what value was it holding during that period of time.
It sounds wague but i had task to accomplish.
I will appriciate if you share your ideas, Thanks in advance.