You need to sign in to do that
Don't have an account?
trigger on note not working
Hi ,
I have written a trigger on NOTE ,which will update a checkbox called note_availbale__c on event object.
scenario:
if there is a note the Note_avilable__c should be checked
Here My Code:-
trigger NoteAvilable on Note (after insert,before delete,after update){
if(trigger.isinsert){
List<Event> co = New List<event>([select id from Event where id =: Trigger.New[0].ParentId]);
If(co.size()>0){
co[0].Note_Available__c = True;
update co;
}
}
if(trigger.isdelete){
List<Event> co = [select id from Event where id =: Trigger.old[0].ParentId];
If(co.size()>0){
co[0].Note_Available__c = false;
update co;
}
}
}
Its not firing .
Thanks In Advance
Tapas
I have written a trigger on NOTE ,which will update a checkbox called note_availbale__c on event object.
scenario:
if there is a note the Note_avilable__c should be checked
Here My Code:-
trigger NoteAvilable on Note (after insert,before delete,after update){
if(trigger.isinsert){
List<Event> co = New List<event>([select id from Event where id =: Trigger.New[0].ParentId]);
If(co.size()>0){
co[0].Note_Available__c = True;
update co;
}
}
if(trigger.isdelete){
List<Event> co = [select id from Event where id =: Trigger.old[0].ParentId];
If(co.size()>0){
co[0].Note_Available__c = false;
update co;
}
}
}
Its not firing .
Thanks In Advance
Tapas
Let us know if it helps you.
Thanks for your response, still the code is not working i mean the trigger is not firing.
Thanks
Tapas
Hi Tapas,
Please use below code snippet and let me know the results :)
Thanks
Rajat Maheshwari
rajatzmaheshwari@gmail.com
Trigger for counting notes records.