0

Am trying to prevent users from creating duplicate records based on Date and Hour combination from Date/Time field.Since we cannot refer date/time field in Matching rule,so I had move this (Date+Hour)logic to workflow/field update.But Duplicate rule is not evaluating after workflow field update.

Order of execution says duplicate rules fire first then workflow field update

Also there is an idea Validation Rules and Duplicate Rules Should Fire After a Workflow Field Update

I also tried making workflow field update (Date+Hour) field as Unique but the problem is we cannot customize error message where as in duplicate rule we can customize error message.

Is there a way to achieve this declaratively?

2
  • If I understand your problem, I'm guessing the answer is no. You're going to have to resort to code. – sfdcfox Mar 9 '17 at 22:33
  • apex trigger (before insert/update) to copy Date+Hour into custom field; then duplicate rule on the custom field – cropredy Mar 11 '17 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.