FUYU
2023-05-19 559771a80cf779dc13a84ecd2f178e6ca5a8353a
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
30
31
<apex:page standardController="CampaignMember__c" extensions="ViewParticipantsController" id="page">
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
    <apex:form id="form">
        <apex:pageblock id="pageBlock">
            <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
                <apex:outputText label="统一用户Id" id="viewContactId"  value="" />
            </apex:pageBlockSection>
            <script>
                
                var staticResources = JSON.parse('{!staticResourceContact}');
                console.log(staticResources)
                function QuerySobjectFromAWS() {
                    //查找viewContactId
                    var queryBackContactId = function queryBackContactId(data) {
                        console.log(JSON.stringify(data))
                        if(data.status == '0'){
                            document.getElementById('page:form:pageBlock:pageBlockSection:viewContactId').innerText = data.object.viewContactId;
                        }
                    };
                    AWSService.query(staticResources.viewUnifiedContactUrl, '{!viewContactId}', queryBackContactId, staticResources.token);
                }
                sfdcPage.appendToOnloadQueue(function () {
                    debugger
                    QuerySobjectFromAWS();
                });
            </script>
        </apex:pageblock>
    </apex:form>
</apex:page>