You need to sign in to do that
Don't have an account?
how to discover duplicate leads and be able to field update automatically ?
we have duplicate leads with different amounts, we want to be able to keep the one with the highest amount and the rest keep them inactive till users decide to keep them or delete them. is there a way i cna identify this automaticall and field update the ones with less amount with in-active ?
can this done by flows ? or apex?
can this done by flows ? or apex?
You can develop a schedulable apex job and schedule it daily/hourly which will update the duplicate leads as inactive.
Assuming that you have below fields on Lead
Amount__c
IsActive__c (checkbox field)
Email (standard field)
Schedulable apex Job
See how to schedule apex jobs.
https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=5
You can also run it from developer console.
Let me know If you have any question.
i get the foolowing error
Line: 1, Column: 26
Method does not exist or incorrect signature: void executeBatch(DeduplicateLeads, Integer) from the type Database
You can also schedule this class vis UI. See
https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=5
Scheduler: failed to execute scheduled job: jobId: 7073D00000D4DI8, class: common.apex.async.AsyncApexJobObject, reason: Too many query rows: 50001
this is another error when i used the above:
Line: 2, Column: 3
Method does not exist or incorrect signature: void excute(NULL) from the type DeduplicateLeads
I think you have more than 50,000 records in the lead object, pleas limit the query to 50,000 as below.
And then use below code to run the class using developer console, the below example will schedule apex job after 5 minutes for only one time.
i am trying to do a batch a job but i am getting an error that the field creditor_name__c is not a vailable. can you please review and tell me what is the issue ? can i use this instead?