You need to sign in to do that
Don't have an account?
Priya 777
New to Developing Please help me with Test Class for this trigger
trigger DCStargeting on Account (before insert,before update,after insert,after update) {
Set<id> userIds = new Set<Id>();
for (Account o : Trigger.new){
userIds.add(o.OwnerId);
if(o.Floorplan_Source2__c!=null&&o.Floorplan_Source2__c!=o.Current_Floor_Plan__c){
o.Current_Floor_Plan__c=o.Floorplan_Source2__c;
o.DCS_targeting_date__c= Date.today();
}
}
}
Set<id> userIds = new Set<Id>();
for (Account o : Trigger.new){
userIds.add(o.OwnerId);
if(o.Floorplan_Source2__c!=null&&o.Floorplan_Source2__c!=o.Current_Floor_Plan__c){
o.Current_Floor_Plan__c=o.Floorplan_Source2__c;
o.DCS_targeting_date__c= Date.today();
}
}
}
This is the test class for your trigger, You can use it,
Hope, It will be helpful for you, If it helps you, then please select my answer as Best answer to Close this Question from unsolved threads,
Regards
Suraj