| | |
| | | @description : |
| | | @author : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | @group : |
| | | @last modified on : 03-17-2022 |
| | | @last modified on : 03-29-2022 |
| | | @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | --> |
| | | <apex:page standardController="Rental_Apply__c" extensions="RentalApplyController" id="page"> |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:form id="form"> |
| | | <apex:pageblock id="pageBlock"> |
| | | <!-- <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection"> |
| | | <!--Each section has layoutFields, let's iterate them as well--> |
| | | <!-- <apex:repeat value="{!encryptedAPIList}" var="encryptedAPI"> |
| | | <apex:outputField html-data-id="{!encryptedAPI}" value="{!Rental_Apply__c[encryptedAPI]}" /> |
| | | </apex:repeat> |
| | | </apex:pageBlockSection> --> |
| | | |
| | | <apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection"> |
| | | <!--Each section has layoutFields, let's iterate them as well--> |
| | | <apex:repeat value="{!encryptedAPIList}" var="encryptedAPI"> |
| | | <apex:outputField html-data-id="{!encryptedAPI}" value="{!Rental_Apply__c[encryptedAPI]}" /> |
| | | <apex:outputField html-data-id="{!encryptedAPI}" title="{!ApiPrefix}{!encryptedAPI}" value="{!Rental_Apply__c[encryptedAPI]}" /> |
| | | </apex:repeat> |
| | | </apex:pageBlockSection> |
| | | <script> |
| | | var staticResources = JSON.parse('{!staticResource}'); |
| | | var AWSToSobjectEncryptedMapJson = JSON.parse('{!AWSToSobjectEncryptedMapJson}'); |
| | | var ApiPrefix = '{!ApiPrefix}'; |
| | | function QueryConsumApplyFromAWS() { |
| | | AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token); |
| | | } |
| | | var queryBack = function queryBack(data) { |
| | | document.querySelector("[id='page:form:pageBlock:pageBlockSection:j_id2:1:j_id3']").innerHTML = data.object.phoneNumber; |
| | | document.querySelector("[data-id='direct_shippment_address__c']").innerHTML = data.object.directShippmentAddress; |
| | | // document.querySelector("[id='page:form:pageBlock:pageBlockSection:j_id2:0:j_id3']").innerText = data.object.phoneNumber; |
| | | // document.querySelector("[data-id='direct_shippment_address__c']").innerText = data.object.directShippmentAddress; |
| | | if(!data.object){ |
| | | console.log('data.object is ' + data.object); |
| | | return; |
| | | } |
| | | for(let f in AWSToSobjectEncryptedMapJson){ |
| | | let t = "[title='"+ApiPrefix+AWSToSobjectEncryptedMapJson[f]+"']"; |
| | | let ele = document.querySelector(t); |
| | | if(ele){ |
| | | ele.title = ''; |
| | | if(data.object.hasOwnProperty(f)){ |
| | | ele.innerHTML = data.object[f]; |
| | | } |
| | | else{ |
| | | console.log(f + 'is not in data.object'); |
| | | } |
| | | }else{ |
| | | console.log('selector='+t+' not found'); |
| | | } |
| | | |
| | | } |
| | | }; |
| | | sfdcPage.appendToOnloadQueue(function () { |
| | | console.log('sfdcPage.appendToOnloadQueue'); |