You need to sign in to do that
Don't have an account?
RayAllen
How to create a duplicate opportunity from previous when the opp stage is equal to a certain stage
Hello,
I want to create a duplicate opportunity, for example, if opportunity stage is equal to “won” , I want it to be able to create an exact replica of the old opportunity. I know I’ll have to make a workflow and use apex code.
How can I write the formula for this?
Also, I would want it to be fully automated.
This would need to written as a trigger. Do some research on the sObject Clone method.
I haven't tested this, but something along these lines should do the trick... or get you cklose at least:
Thanks guys really appreciate it.
Another question, do I have to add an Apex test class? What would that formula look like?
Thanks
Here is the test code:
@isTest