You need to sign in to do that
Don't have an account?
Ganta Suresh
Write a trigger - If agreement is cancelled , it should auto-delete after 5 days of cancelling. and Warning sign will be displayed on the screen after agreement is cancelled.
Write a trigger - If an agreement is canceled, it should auto-delete after 5 days of canceling. and a Warning sign will be displayed on the screen after an agreement is canceled.
Go to setup-> Flow-> New flow and select record triggered flow and select object as Agreement object.
In the above screenshot instead of Active field select status of agreemnt and select value as Cancelled.
Now select the scheduled path by clicking in start element as shoiwn below.
Now provide all the details as shown below. Instead of Account updated selet Agreement updated.
Now onclick Plus symbol as shown below and select delete record option from the available options and provide the details as shown below.
Now save the flow and click on activate button .
When a record is edited and put as Cancelled then this flow will delete that record after 5 days.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
Even for the deletion of the record after 5 days you may have to go with similar batch or scheduled flow or workflow. By using trigger you cannot set future actions as I said in my eariler question.
Displaying the warning sign means do you want any text displayed on the record once it is Cancelled showing that the agreement is already cancelled?
Thanks,
As per your requirement the record should deleted 5 days after cancellation . So how can we show on screen that "canceled agreement was deleted" after 5 days?
Ideally what I guess it we should show on the screen saying that this agreement is cancelled and will be deleted in 5 days. Can you confirm on it.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
my case If an agreement is canceled, it should auto-delete after 5 days of canceling.
A warning sign will be displayed on the screen after an agreement is canceled
A small correction to my previous answer. This may not be able to do with workflow because we cannot delete record using workflow
We have to do it with flow . Are you okay with it
Thanks,
Go to setup-> Flow-> New flow and select record triggered flow and select object as Agreement object.
In the above screenshot instead of Active field select status of agreemnt and select value as Cancelled.
Now select the scheduled path by clicking in start element as shoiwn below.
Now provide all the details as shown below. Instead of Account updated selet Agreement updated.
Now onclick Plus symbol as shown below and select delete record option from the available options and provide the details as shown below.
Now save the flow and click on activate button .
When a record is edited and put as Cancelled then this flow will delete that record after 5 days.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,