| | |
| | | <!-- |
| | | @description : |
| | | @author : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | @group : |
| | | @last modified on : 03-04-2022 |
| | | @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc |
| | | --> |
| | | <apex:page standardController="Quotes__c" extensions="NewAndEditQuotesController" id="page"> |
| | | <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> |
| | | <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script> |
| | |
| | | } |
| | | let phone = document.querySelector(textPhone); |
| | | |
| | | if(phone && !/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){ |
| | | if(false && phone && !/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){ |
| | | error_msg += ';电话号码错误'; |
| | | } |
| | | |
| | |
| | | // Check Required Field |
| | | let checkRequiredFieldMsgResult = checkRequiredFieldMsg(sobjJson); |
| | | if (checkRequiredFieldMsgResult) { |
| | | alertErrorMessage('requiredErrorMsg' + checkRequiredFieldMsgResult); |
| | | alertErrorMessage('{!$Label.Input_Required_Field_Msg}' + checkRequiredFieldMsgResult); |
| | | return |
| | | } |
| | | // //3. Prepare the payload for New PI API To AWS - To Do |
| | |
| | | |
| | | //替换vlookup |
| | | var newSearchContactWindow = null; |
| | | var closeField = ''; |
| | | // var closeField = ''; |
| | | |
| | | function replaceSearchContactLookup() { |
| | | if (!{!isNewMode}) { |
| | |
| | | |
| | | //自定义lookup查询 |
| | | function searchContact(contactNodeId,field){ |
| | | closeField = field; |
| | | // closeField = field; |
| | | let accountValue = ""; |
| | | if (document.querySelector("[data-id='AccountId']")) { |
| | | let accountNodeId = document.querySelector("[data-id='AccountId']").id + '_lkid'; |
| | |
| | | let contactInfoStr = document.getElementById('page:form:contactId').value; |
| | | console.log('closePopup:'+contactInfoStr); |
| | | let contactInfo = JSON.parse(contactInfoStr); |
| | | let contactNodeId = document.querySelector("[data-id="+closeField+"]").id + '_lkid'; |
| | | let contactNodeId = document.querySelector("[data-id='CONTACT_NAME__c']").id + '_lkid'; |
| | | document.getElementById(contactNodeId).value = contactInfo.ContactId; |
| | | document.querySelector("[data-id="+closeField+"]").value = contactInfo.Name; |
| | | document.querySelector("[data-id='CONTACT_NAME__c']").value = contactInfo.Name; |
| | | } |
| | | |
| | | </script> |