You need to sign in to do that
Don't have an account?
elgutier
Moving records from one related list to another within an object
Hello everyone,
I have a new requirement where I would need the following:
Once the status from an Opportunity created is modified to Lost or Won, move this opportunity to a new "Opportunity_History__c" related list.
Thanks for your inputs/comments.
Hi,
You have to create a trigger on opportunity object
Use the below code snippet as reference:
trigger chnagestatus on Opportunity (before update)
{
if(trigger[0].new.status == 'Won' || trigger[0].new.status == 'Lost' )
{
trigger[0].new.Opportunity_History__c='id of record by which you want to associated this Opportunity';
}
}
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi Ankit,
Thanks for your prompt reply but I guess your response does not cover my requirement. I basically need the following:
1) If an Opportunity.Opportunity_ID equals to Lost, record is removed from Opportunity and moved to Opportunity_Business_History__c where Opportunity_ID information is populated from Opportunity.Opportunity_ID, same as other fields. Basically I would need to remove the record from one related list and paste it into a newly created custom object (related list) within the same Object (Opportunity).
Thanks.