You need to sign in to do that
Don't have an account?
Ganta Suresh
write a trigger - Agreement will auto expire when expiration date is met
Please help me..!
Write a trigger - when an agreement will auto-expire when the expiration date is met an alert will be sent 3 months before the expiration date.
I am creating it on Account object as I dont have Agrreemnt object.
Go to setup-> Workflow Rules-> new-> select object as Agreement.
Now click on save and next and in next screen click on button as shown below.
Add 90 days and select after expiration date as below.
Now click on new email alert as shown below.
and then select the email alert and other mandatory values and save it and then activate the worjflow rule.
If we use scheduled flow the it will run every day and checks which will expire in 90 days and send the emails.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
Do you want trigger or you are fine with Flow?
I hope agreement is custom object and you want 3 monthe before expoiratoon date you need to send an email. But with trigger this may not be possible because trigger will only fire when record is created ot updated but here with out updation of record the email should be triggered before 3 months of exipiration date.
Ideally this should be scheduled triggerv flow or Batch apex.
Thanks,
As said earlier you cannot schedule an action to send 3 months before expiration using trigger.
You can only do with batch class or Sceduled Flow or time dependant workflow
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
using my case - when an agreement will auto-expire when the expiration date is met an alert will be sent 3 months before the expiration date.
I am creating it on Account object as I dont have Agrreemnt object.
Go to setup-> Workflow Rules-> new-> select object as Agreement.
Now click on save and next and in next screen click on button as shown below.
Add 90 days and select after expiration date as below.
Now click on new email alert as shown below.
and then select the email alert and other mandatory values and save it and then activate the worjflow rule.
If we use scheduled flow the it will run every day and checks which will expire in 90 days and send the emails.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,