Before loading an object into salesforce, you can deactivate the triggers and validation rules on it. Thereafter, once you load using apex data loader these are overrided.
Deactivating triggers and validation rules may be a solution if you don't have to do that every day. A best alternative is to include that in your business logic having an hidden checkbox you set to TRUE when you want to bypass the triggers, validation rules and workflow. Then, you have to ckeck the value of this field for every component you want to allow the bypass. Good explanation here http://lunego.com/blog/ignore-validation-rules/ and here https://developer.salesforce.com/forums/ForumsMain?id=906F00000009FRoIAM for example.
Notice that it is a good practice to have a mecanism to deactivate rules, workflow and triggers based on custom setting. Mark your question Solved if these answers help you, and don't forget to flag the best one.
Before loading an object into salesforce, you can deactivate the triggers and validation rules on it. Thereafter, once you load using apex data loader these are overrided.
Deactivating triggers and validation rules may be a solution if you don't have to do that every day.
A best alternative is to include that in your business logic having an hidden checkbox you set to TRUE when you want to bypass the triggers, validation rules and workflow.
Then, you have to ckeck the value of this field for every component you want to allow the bypass.
Good explanation here http://lunego.com/blog/ignore-validation-rules/ and here https://developer.salesforce.com/forums/ForumsMain?id=906F00000009FRoIAM for example.
Best regards,
Fred
Notice that it is a good practice to have a mecanism to deactivate rules, workflow and triggers based on custom setting.
Mark your question Solved if these answers help you, and don't forget to flag the best one.
Regards,
Fred
Thank you for ur answer.. can u provide how to do custom setting (logic for trigger bypass), because i am new to sfdc.
Here is a detailed example http://learnsf.wordpress.com/2011/05/21/disable-validation-rules-4-data-load/
Does this answer help you solved your problem?
If so, mark the question as Solved and kindly select the best answer.
Thanks,
Fred
How do you get this method to apply for a workflow rules filter?
http://learnsf.wordpress.com/2011/05/21/disable-validation-rules-4-data-load/