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
Vianney Bancillon 8Vianney Bancillon 8 

Workflow send e-mail wrongly

Hello everyone,

I recently set up a workflow that works in the following way :

 - Opportunity’ object that has a field ‘‘Number of days before finalisation’’. This is a formula field that calculates automatically based on the date field ‘‘Commitment to order finalisation’’. This is the formula: Number of days before finalisation= Commitment to order finalisation – TODAY()
- When Number of days before finalisation = -1, the workflow sends an email to the opportunity owner

I thought my test were Ok because:
When the field is not blank and contains -1 , it works correctly (the mail is sent)
When the field is not blank and contains another value than -1, it works correctly (the mail is not sent)
But most of time, when the Opportunity object is just created, the field is blank (this is not a requiered field). In this case, the workflow always send the e-mail.
What is wrong in my workflow rule?

Thanks for your help!