<apex:page standardController="Agency_Opportunity__c" extensions="NewAndEditAgencyOpportunityController" id="page" lightningStylesheets="true">
|
<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:slds />
|
<div class="slds-scope">
|
<apex:form id="form">
|
<apex:pageblock id="pageBlock">
|
<div class="slds-box slds-theme_default">
|
<apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
|
<apex:outputField html-data-id="Agency_Contact__c" title="{!ApiPrefix}Agency_Contact__c" value="{!Agency_Opportunity__c['Agency_Contact__c']}"
|
/>
|
</apex:pageBlockSection>
|
</div>
|
|
<script>
|
var staticAgencyContactResources = JSON.parse('{!staticAgencyContactResources}');
|
|
function QuerySobjectFromAWS() {
|
let t = "[title='" + '{!ApiPrefix}' + "Agency_Contact__c']";
|
let ele = document.querySelector(t);
|
if ('{!agencyContactAWSId}' != '无') {
|
if ('{!agencyContactAWSId}' != '') {
|
AWSService.query(staticAgencyContactResources.queryUrl, '{!agencyContactAWSId}', queryAgencyContactBack, staticAgencyContactResources.token);
|
}
|
} else {
|
ele.innerHTML = '';
|
}
|
}
|
|
var queryAgencyContactBack = function queryAgencyContactBack(data) {
|
if (!data.object) {
|
console.log('data.object is ' + data.object);
|
return;
|
}
|
console.log('data is ' + data.object);
|
|
let t = "[title='" + '{!ApiPrefix}' + "Agency_Contact__c']";
|
let ele = document.querySelector(t);
|
if (ele) {
|
ele.title = '';
|
ele.innerHTML = data.object.name;
|
}
|
|
};
|
|
sfdcPage.appendToOnloadQueue(function () {
|
console.log('sfdcPage.appendToOnloadQueue');
|
debugger
|
QuerySobjectFromAWS();
|
});
|
</script>
|
</apex:pageblock>
|
</apex:form>
|
</div>
|
|
</apex:page>
|