You need to sign in to do that
Don't have an account?

Help with apex class to attend to my trigger call
Hi,
I am new to apex and I need assistance creating a class to attend with my trigger call.
I am new to apex and I need assistance creating a class to attend with my trigger call.
trigger TargetCompletionTime on Predecessor_Task__c (before insert, before update) { BusinessHours stdBusinessHours = [select id from BusinessHours where Name = 'Default']; for(Predecessor_Task__c pt : trigger.new) { if((pt.Actual_Start_Date_Time__c!=null) && (pt.Alloted_Hours__c!=null)) { DateTime d1=BusinessHours.add(stdBusinessHours.Id, pt.Actual_Start_Date_Time__c, integer.valueOf(pt.Alloted_Hours__c * 60 * 60 * 1000)); pt.Target_Completion_Date_Time__c=d1; } } }
What do you mean by "attend with my trigger call"? Are you refering to a class to test your trigger?