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
AnjaneyluAnjaneylu 

Opportunity to update Account field

Hi all,
Here my requirement is i want to update account field from opportunity object,
Account is having picklist field (status__C) and values are Prospect, Customer, Dormant, New Landing.
 
Criterias# A:
1. On 10/Oct/2015: A New Oppty is Created, Oppty Stages != Closed
--> Acc.SW_Status__c = Prospect
(Ref: Oppty "CreatedDate" Date)

2. After 31 Days for still it is not closed,  lets say 11/Nov/2015 for other Oppty Stages != Closed
--> Acc.SW_Status__c = Customer
(Ref: Oppty "CreatedDate" Date)

3. After 24 Months for same Oppty (#2), lets say 12/Nov/2017 and Oppty Stages != Closed
--> Acc.SW_Status__c = Dormant
(Ref: Oppty "Customer" LOV Date)
and my second criteria is 
riterias# B:
4. On 25/Oct/2015, I changed manually the Oppty Stages == Closed,
--> Acc.SW_Status__c = New Landing
(Ref: Oppty "ClosedDate" Date)

5. After 24 Months for same Oppty (#4), lets say 26/Oct/2017 and Oppty Stages == Closed
--> Acc.SW_Status__c = Dormant
(Ref: Oppty "New Landing" Date)

Criterias# C:
6. After 24 Months for same Oppty (#1), lets say 11/Oct/2017 and Oppty Stages != Closed
PS: Here we are NOT changing anything on this Oppty.
--> Acc.SW_Status__c = Dormant
(Ref: Oppty "CreatedDate" Date)

Here i am not able to process..
So kindly please help me,. 

Thanks in Advance 
Anji

 

Raja236Raja236
Hi 

have a two check boxes one for new opportunity and one for manualy changed, create a batch class to process the records and un check the check boxes in batch other wise these records will pick up again.