You need to sign in to do that
Don't have an account?
Sam Ward
can anyone help me write a test class??
I have written the above code but I'm unsure how you would write a test class can someone point me to a video or any documention which will help me learn this please?
I have attached my code incase its a really simple test class to write.
Thanks in advance
I have attached my code incase its a really simple test class to write.
global class MarketingClicks implements Schedulable { global void execute(SchedulableContext ctx) { List<Lead> Leadlist = [SELECT Id, Campaign_Name__c FROM Lead WHERE Link_Type__c != '']; for(Lead L : LeadList) { //Create Marketing Click L.Link_Type__c = 'TEST'; Pardot_Campaign__c PC = new Pardot_Campaign__c(); PC.Lead__c = L.Id; PC.Name = L.Campaign_Name__c; insert PC; L.Campaign_Name__c= ''; Update L; } System.debug(Leadlist); } }
Thanks in advance
https://developer.salesforce.com/forums/?id=906F00000008yhmIAA
https://salesforce.stackexchange.com/questions/17428/test-class-for-schedulable-interface
Please mark as correct if it helped you, it may help others asking the same.
can anyone point out where i'm going wrong please?
Thanks
Maybe you are not even getting inside de batch at all or the "I" record is not filling properly.
Please post entire code relevant to the issue so I can help better. Thanks