Sunday, July 2, 2017

Trigger Scenario: 
I have requirement fire the trigger when data is uploading through data loader. It should not execute when record saved from User interface? How to achieve that?



You could add a custom checkbox field which is hidden from the pagelayout.
· This field could be mapped to always insert as "true" with dataloader.
· Make your after insert trigger only execute conditionally on this field to be true.

· Optionally have your trigger set the field to false, or you could keep it as true to see that these records were imported through data loader.

No comments:

Post a Comment