Hi all,
I need to create a renewal opportunity based on order parameters.
I try to explain:
- An order is related to each opportunity. On the order object there is the ACTIVATED field (checkbox)
- (one or more) OrderProduct are related to an Order
- Evry OrderProduct line have startdate and enddate
So, when an order has ACTIVATED field checked, I need to create an opportunity and then relate to that opportunity the same product present in the OrderProduct object.
WARNING: if more OrderProducts are related to an Order Activated I need to create more opportunities (on for each and date).
Example:
Opportunity A --> Order X --> OrderProduct 1 EndDate = 31/12/2020
--> OrderProduct 2 EndDate = 31/12/2020
--> OrderProduct 3 EndDate = 10/10/2020
In this case, I need to create 2 opportunities:
- Opp B (with product 1 and 2)
- Opp C (with product 3)
I hope is clear.
Can anyone help me?
Tks :-)