You need to sign in to do that
Don't have an account?
Muhammad Jawwad 16
How to track the opportunity stages and send the reminder email to the record owner?
Scenario is: If Quote stage exceeds 7 days, send email reminder to record owner to follow up with quote
https://developer.salesforce.com/docs/atlas.en-us.usefulWorkflowRules.meta/usefulWorkflowRules/workflow_examples.htm
I think, below link will be helpful:
https://developer.salesforce.com/forums/?id=906F0000000g2K2IAI
As far as I understand your question you have some field in Quote to store days. If yes then:
1. First, you'll need a query on the opportunity to get that quote (SyncedQuoteID).
2. Next after receiving that Quote fetch your days.
3. Also, store opportunityId and its corresponding ownerId for that particular quote.
4. Now check if the stage(Quote) is greater than 7 then use Messaging.SingleEmailMessage to send mail to stored OwnerId.
5. For more on how to send emails: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_forcecom_email_outbound.htm
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha