
Requirement:
I need to stop users from entering a future date in a "Date and Time of Data Breach" field. If the selected date is later than today, it should be blocked with an error message. Past and current dates should be allowed. This has to be achieved using OOTB. No-code features , JavaScript or plugins.
Field details: custom entity (Data Breach), field il_dateandtimeofdatabreach, behaviour = User Local, format = Date and Time. The Data Breach entity is related to Case, and the field is entered via the Case form (Data Breach tab). Environment: D365 Customer Service, model-driven.
What I tried (and didn't work):
I built a real-time workflow on the Data Breach entity (scope Organization, trigger on Record Created):
Date and Time of Data Breach > [anchor], then Stop Workflow → Canceled with a custom error.I tried three different anchors for "today":
In every case, when I create a record with a clearly future date (e.g. today 19 June, breach date 24 June), the workflow job shows Succeeded — it never reaches the Cancel step and the record saves with no error. Logically Process-Execution Time = now, so the condition should be TRUE, but it Succeeds every time.
Other OOTB options I'm aware of