批处理类构造函数重载错误方法不存在或签名不正确

时间:2019-02-14 18:09:29

标签: apex

我继续收到错误消息,指出我的方法不存在或签名不正确,但是它要查找的签名与我的基本构造方法完全相同。

global class BatchUpdateUserActiveStatus implements Database.Batchable <sObject>{
    private String strQuery {get; set;}
    private Boolean isAlert {get; set;}
    private Boolean isDeactivate {get; set;}
    private ID alertEmailTemplateId {get; set;}
    private String strDeactivationNoteText {get; set;}


    public BatchUpdateUserActiveStatus(String query, Boolean isDeactivate, String strDeactivateNote)
    {
        Id tmpID; // value should be null
        BatchUpdateUserActiveStatus(query, isDeactivate, strDeactivateNote, tmpID, false);
    }



    public BatchUpdateUserActiveStatus(String query, ID templateID, Boolean isAlert)
    {
        Boolean tmpBool; // value should be null
        //isDeactivate = null will neither deactivate or freeze
        BatchUpdateUserActiveStatus(query, tmpBool, '', templateID, isAlert);
    }   



    public BatchUpdateUserActiveStatus(String query, Boolean isDeactivate, String strDeactivateNote, ID templateID, Boolean isAlertUser)
    {
        this.strQuery =  query;
        this.isAlert = isAlertUser;
        this.isDeactivate = isDeactivate;
        this.alertEmailTemplateId = templateID;
        this.strDeactivationNoteText = strDeactivateNote;
    }    

如您所见,代码底部的构造函数是设置变量的基本构造函数。但是我继续遇到这个错误

BatchUpdateUserActiveStatus类:方法不存在或签名不正确:类型为BatchUpdateUserActiveStatu的void BatchUpdateUserActiveStatus(String,Boolean,String,Id,Boolean)

0 个答案:

没有答案