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
Nauty LearnerNauty Learner 

Trigger Not working with bulk upload via WorkBench

I have a trigger to check the duplicate records in salesforce..its working fine when I'am inserting a duplicate record manually, So it is throwing the "dublicates record found" error mesage,
but, 
Now when i'm deleting that record from salesforce and
when I'm trying to upload the same record twice (created 2 rows containing same data in my input csv file) by workbench, trigger is not getting fired ,and it is successfully inserting both the records with the same data to salesforce, whereas the expectation is first row data should get inserted and for second row, it should throw the error(because its a dublicate data).

Can anyone please help me out with this ?
Anthony McDougaldAnthony McDougald
Good Afternoon Nauty,
Hope that your day is off to an amazing start. May we inquire if your trigger is bulkfied to handle the record set and to iterate through each to check for duplications? To check this, does your code possess a for loop that iterates through the records in a Trigger.new set? If you need better assistance, please post an edited sample of your code (for security and privacy remove all personal data) and we would be more than happy to troubleshoot this for you. Hope this helps and may God bless you abundantly.
Best Regards,
Anthony McDougald