高章伟
2022-02-18 8b5f4c6c281cfa548f92de52c8021e37aa81901e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public with sharing class CampaignMemberEditAndDeleteController {
    public boolean RecordTypecheck { get; set; }
    public string campaignId;
    public CampaignMemberEditAndDeleteController() {
        campaignId = ApexPages.currentPage().getParameters().get('retURL');
 
    }
    public CampaignMemberEditAndDeleteController(ApexPages.StandardController controller){
        this();
    }
    public void init() {
        system.debug(campaignId);
        campaignId = campaignId.replace('/','');
        system.debug(campaignId);
        RecordTypecheck = false;
        list<Campaign> Campaignlist = [select id, RecordType.developerName from Campaign where id  = : campaignId];
        if (Campaignlist.size() > 0 && Campaignlist[0].RecordType.developerName.equals('ServiceEngineerTraining'))
            RecordTypecheck = true;
        }
}