liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
global class ViewParticipantsController {
    public String staticResourceContact {get; set;}
    public String viewContactId {get; set;}
    public ViewParticipantsController(ApexPages.StandardController controller) {
        staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
        SObject obj = controller.getRecord();
        if (obj.id != null||Test.isRunningTest()) {
            List<CampaignMember__c> lcm = [select ViewContactId__c from CampaignMember__c where id=:obj.id];
            if (lcm.size() > 0) {
                viewContactId = lcm[0].ViewContactId__c;
            }
        }
    }
}