I know I'm not the first person to ask this but I've read many blogs, none of them solved my problem. I have a custom object say "Invitation__c" where I have a custom Date field.

My requirement is I want the combination of Name and Date field to be unique. I already created a Unique Case Insensitive Text field (Composite_Key__c) and a Workflow rule (Everytime a record is created and edited) with Rule criteria Invitation: Composite Key EQUALS Invitation: Name & Date and a Field Update Workflow on Composite Key field. But its not solving my problem. Its only giving the error on Duplicate Name but not on the combination of Name and Date.

I guess the Workflow rule needs to be updated but I've tried many options, none solved it.Please help.

1 Answer 1


First of all -

the workflow criteria should be such that it fires every time. Something like :

Name is not '' (Blank)

Next the field update formula value should be like

Name & '-' & TEXT(MyDateField__c)

this should work

Please ensure -
1. its a date field and not datetime
2. Keep only name criteria in W/F rule. Remove the other one.

  • Thanks for your inputs. I edited the workflow as suggested: Rule criteria- (Invitation: Name NOT EQUAL TO null) AND (Invitation: Date NOT EQUAL TO null). Field update field: Field to Update- Invitation: Composite Key. Formula Value Name & "-" & TEXT(Date__c). But this is not solving the issue either. Please suggest. Commented Dec 8, 2014 at 9:14
  • Does it work now? Commented Dec 8, 2014 at 9:16
  • Nope. :( Please refer my previous comment and suggest if I'm heading towards the right approach. Commented Dec 9, 2014 at 8:40
  • Check updates to answer Commented Dec 9, 2014 at 10:37
  • I edited the rule. But still it is allowing me to create a duplicate record. Please note that at the toke of creating the record, I'm only entering data in Name and Date__c field and not in Composite key field as I only need the unique record against the combination of Name and Date__c field. Commented Dec 9, 2014 at 10:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .