我安排了每天上顶课,但什么也没发生.有人可以帮我吗? [英] I sheduled an apex class to run everyday, but nothing happens. Can somebody help me out?

查看:88
本文介绍了我安排了每天上顶课,但什么也没发生.有人可以帮我吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了这个APEX类,并安排它每天运行.我没有收到错误消息,但是不幸的是,该类没有任何作用...有人可以帮我吗?

I wrote this APEX class and sheduled it to run every day.I don't get an error message, but unfortunately the class doesn't do anything... Can anybody help me out?

global class CustomersDateCheck implements Schedulable {
global void execute(SchedulableContext sc) {
List<Customers__c> CustomerList = [SELECT Id FROM Customers__c];
DateCheck(CustomerList);}

public static void DateCheck(Customers__c[] objects){


  for(Customers__c obj: objects){

    if(obj.DateField > Date.today()){
            continue;}

        else{obj.FlowUpdateHelper__c = true;}
    }
  }
}

推荐答案

该错误表示您正在尝试访问查询中未包含的内容,在本例中为Customers__c.DateField__c,您需要删除对此的引用,或者更新您的查询以包含该信息

The error means you're trying to access something that you didn't include in the query, in this case the Customers__c.DateField__c , you need to either remove the reference to that, or update your query to include that info

这篇关于我安排了每天上顶课,但什么也没发生.有人可以帮我吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆