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
Jairus McClureJairus McClure 

Using ISCHANGED function to avoid duplicate values

One of my teams uses Cases in salesforce when logging their interaction with customers. When interaction with the customer is done, they will either close the case or select "Close to Lead" if they believe there is potential for future business a salesperson should follow up with. I also have a picklish on the case record called "Closed to Lead" that is automatically changed from "No" to "Yes" whenever a case is closed to a lead. Whenever the closed to lead picklist is changed to yes it triggers an automated creation of a new lead that is assigned to a sales person. 

The only problem is in some cases the original case team is contacted again after they've closed a case, so they must change the case status back to "In Progress", work with the customer again, and then close the case once again. This creates duplicate leads as every time the case is edited again the process builder recognizes the picklist as being "Yes" and creates a new lead every time the case is created. 

I've tried using the ISCHANGED function is process builder to prevent this, but for some reason it won't work. Does anyone have any idea a formula that would prevent the duplicate leads being created? 
Arundhati DuttaArundhati Dutta
Hello Jairus,
The best way to avoid creating duplicate lead is to use duplicate rule, by putting the desired condition of duplicacy in matching rule.
Please let me know if this works for you.
Regards
Arundhati Srivastava.
Salesforce Consultant
Webkul Software Pvt. Ltd