You need to sign in to do that
Don't have an account?
anvesh@force.com
How to delete a record when Trigger fired?
when field met certain value then that record should need to delete...is this possible through trigger....
My requirement is i have field Activity_Type__c =' ' (is no value)..then this record should be deleted. so i written this trigger but not working.
trigger DeleteTask on Task (after insert) {
task t= new task();
if(t.Activity_Direction__c==''){
task t1=t.clone();
t.remove(t1);
}
}
Please anyone have sollution?
Hi anvesh,
Here is the sample code as per your requirement.
Apex Trigger:
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
My Blog:- http://mrjavascript.blogspot.in/