高章伟
2022-03-18 a0bc3e3af59aed35334bdc38256a7a1dfe8aecf3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
public with sharing class AccountQualifyAlertController {
    
    public String idl { get; set;}
    public boolean is_Alert_Qualify {get; set;}
 
    public AccountQualifyAlertController() {
        idl = ApexPages.currentPage().getParameters().get('id');
    }
 
    public AccountQualifyAlertController(ApexPages.StandardController controller) {
        idl = ApexPages.currentPage().getParameters().get('id');
    }
 
    public void init() {
        list<Account> accList = [select id, 
                                        Quolified_Approve_Status__c, 
                                        If_Need_Quolified__c 
                                   from Account 
                                  where id =:idl];
        is_Alert_Qualify = false;
        
        if (accList != null && accList.size() > 0) {
            if (accList[0].Quolified_Approve_Status__c.equals('Draft') 
                    && accList[0].If_Need_Quolified__c == true) {
                is_Alert_Qualify = true;
            }
        }
    }
}