+ Start a Discussion

Skip records through trigger while data import.

Hi I want to skip records base condition in trigger while data import. For ex: Am importing records in to accounts, now i want to skip accounts where city is Mumbai, how can i achieve this thriough trigger?

You cannot apply filter in DataLoad. Here What you can do just write a validation Rule on City @ Account Object. And whenever this validation will occur your import update/insert will be failed for the record. Here You don't require to have Trigger.

You can create a validation rule to achieve this.


BillingCity = 'Mumbai'


Than display error


@Souvik I just want to skip those records without failing the import wizard.


Then there are two ways for that. 

If you insert through dataloader you can give condition there as 

City != 'Mumbai'




If the record fails through validation rule then it may be failing for that particular record instead of stopping the whole process. So it will skip that particular record and give error for that. Normally dataloader works like that.