function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Divya KS 1Divya KS 1 

generate multiple opportunities based on 3 months contract for 2 years

Abdul KhatriAbdul Khatri
Hi Divya,

You can create a batch to run nightly for this.

You can read the following articles

https://trailhead.salesforce.com/content/learn/modules/asynchronous_apex/async_apex_batch

Abdul
Divya KS 1Divya KS 1
Hi Abdul
I will explain my requirement briefly. When Opportunity is Closed Won and the Contract Duration is 3 months, and planning for further contracts to the same customer so that we have generate multiple opportunites earlier (immediately) for 2years.
So as per the concept, 2years(i.e 24months)/3months calculation, totally 8 opportunites have to generate automatically.

Likewise, I need a calculation basis code to find how much opportunities have to create automatically for 2years.
If i changed the year as 3year, then 12opportunies have to generate.
 
Abdul KhatriAbdul Khatri
Hi Divya,

Sorry for the extreme delay.

Just looking to see if you are still looking for this solution.

Thanks
Divya KS 1Divya KS 1
That's okay...... I have completed my task..
Thank you