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
Laura StanleyHubbardLaura StanleyHubbard 

Workflow or Trigger that References other Records already Created to Prevent Duplicate Fields/Records

We have a custom object on the Account called Pricing. This object has a field called "Worked In State." 

When someone attempts to add a new record and save new pricing record, we need the following to happen:

1. Search other records already created for that Account within the Pricing Object to see if Worked In State entered matches other records
2. Prevent a Save if the states match as in this would create two records with GA, LA, etc...
3. If new, then send a case and create a task (This I can handle)

Thoughts?

Thank you!
CloudyJoshCloudyJosh
Your goal is to prevent duplicate records in the Accounts Object (linked to Pricing Object) from being created, if there is a duplicate "Worked in State" value, is this correct?
Laura StanleyHubbardLaura StanleyHubbard
That's correct!
CloudyJoshCloudyJosh
I think you can create a duplicate rule match and set the "Worked in State" field to "Exact" in the Account Object, then create a Duplicate Rule to block it from being created in the Account Object. Is this what you want?