| | |
| | | @description : |
| | | @author : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | @group : |
| | | @last modified on : 03-17-2022 |
| | | @last modified on : 03-18-2022 |
| | | @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | --> |
| | | <apex:page standardController="Consum_Apply__c" extensions="NewConsumApplyController" id="page"> |
| | |
| | | return template.content.firstChild; |
| | | } |
| | | function queryContactName() { |
| | | // let sfId = document.getElementById(document.querySelector("[data-id='Account__c']").id + '_lkid').value; |
| | | // let contactsInfo = JSON.parse('{!contactsInfo}'); |
| | | // let dataId = contactsInfo[sfId]; |
| | | // let url = staticResourcesContact.queryUrl + '?dataId=' + dataId; |
| | | // fetch(url, { |
| | | // method: 'GET', |
| | | // headers: { |
| | | // 'Content-Type': 'application/json', |
| | | // 'pi-token': staticResources.token |
| | | // } |
| | | // }).then((data) => { |
| | | // return data.json(); |
| | | // }).then((result) => { |
| | | // document.querySelector("[data-id='Loaner_medical_Staff__c']").value = result.object.lastName; |
| | | // }) |
| | | let sfId = document.getElementById(document.querySelector("[data-id='Account__c']").id + '_lkid').value; |
| | | let contactsInfo = JSON.parse('{!contactsInfo}'); |
| | | let dataId = contactsInfo[sfId]; |
| | | let url = staticResourcesContact.queryUrl + '?dataId=' + dataId; |
| | | fetch(url, { |
| | | method: 'GET', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | 'pi-token': staticResources.token |
| | | } |
| | | }).then((data) => { |
| | | return data.json(); |
| | | }).then((result) => { |
| | | let dataId = ''; |
| | | if ('{!contactsInfo}' != '') { |
| | | let contactsInfo = JSON.parse('{!contactsInfo}'); |
| | | dataId = contactsInfo[sfId]; |
| | | } else if ('{!AWSDataId}' != '') { |
| | | dataId = '{!AWSDataId}'; |
| | | } |
| | | let queryBackContactName = function queryBackContactName(result){ |
| | | document.querySelector("[data-id='Loaner_medical_Staff__c']").value = result.object.lastName; |
| | | }) |
| | | }; |
| | | AWSService.query(staticResourcesContact.queryUrl, dataId, queryBackContactName, staticResourcesContact.token); |
| | | } |
| | | //自定义lookup查询 |
| | | function searchContact(contactNodeId){ |