我安排了一个顶级课程每天运行,但没有任何反应.有人可以帮我吗? [英] I sheduled an apex class to run everyday, but nothing happens. Can somebody help me out?

查看:17
本文介绍了我安排了一个顶级课程每天运行,但没有任何反应.有人可以帮我吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了这个 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天全站免登陆