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
MatthewMattMatthewMatt 

Opportunity on field update logic

Experts
In my opportunity screen i have Opportunity type and Sales stage two list fields. I am tying to build a  logic like a Opporuntiy record with type value as "lost" stays more than 30 days from the create date, set the sales stage as "Cancelled".   some logic steps would be appreciate.

Thanks
Matt
AnjithKumarAnjithKumar
Dear Matthew,

Create time based work flow to update the stage as Cancelled.


Thanks,
Anjith Kumar.

 
DeepthiDeepthi (Salesforce Developers) 
Hello Matthew,

You can achieve the above requirement by creating Workflows on Opportunity Object.
Please check the screenshots below.
User-added image 

The formula criteria is as follows: 
AND( ISPICKVAL( StageName ,'Closed Lost'),  (TODAY() -DATEVALUE(CreatedDate))> 30)

Now create Immediate Workflow actions for field update.

User-added image

Let me know if you need any further assistance!

Best Regards,
Deepthi
Vijay NagarathinamVijay Nagarathinam
HI,

You can use process builder to acheive your requirement,

1. Check the entry criteria is Stagename = 'Close lost' and Createddate > 30.
2. If the condition is met then choose the update records action select the stagename = cancelled and schedule your action.

Let me know if you need any help regarding this.

Thanks,
Vijay
MatthewMattMatthewMatt
Deepthi
Your answer is not correct. how to invoke this workflow after 30 days from the created date?

Thanks
Matt
Parker EdelmannParker Edelmann
Schedule a time trigger for 30 days after created, and set up an action on that schedule to do what you're requesting.