+ Start a Discussion
ramesh k 29ramesh k 29 

how to control a trigger when importing data through data loader

vishnu Rvishnu R

you can't control trigger firing while importing data in salesforce via dataloader ...one and only way is to deactivate the trigger before importing data and re-activate it after the import.

vishnu Rvishnu R

it is not possible...if you want this functionality upvote this idea


Hi ramesh k 29

As such it isn't possible but there a solution from your apex code in the trigger.

trigger passingCampaingLeadToAccount on Lead (after update, before insert) {

	if (trigger.new.size() > 1) { // <-- the validation count the size of records to insert or update  
		System.debug('can\'t in');


The word "trigger.new" is a List and is possible validate the size, the trigger only will execute when an user insert a lead from UI (User interface)

Regards from México :D