From 2d5b6ced9bbcb7a30159fd892b39d27a7e048b82 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期日, 24 四月 2022 09:41:45 +0800
Subject: [PATCH] BatchForAgencyContact
---
force-app/main/default/pages/NewAndEditAgencyContact.page | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/force-app/main/default/pages/NewAndEditAgencyContact.page b/force-app/main/default/pages/NewAndEditAgencyContact.page
index 704cfbe..dd4f6aa 100644
--- a/force-app/main/default/pages/NewAndEditAgencyContact.page
+++ b/force-app/main/default/pages/NewAndEditAgencyContact.page
@@ -67,6 +67,9 @@
} else {
payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
}
+ if('{!rtTypeId}'){
+ payloadJson.RecordTypeId = '{!rtTypeId}';//Add by zhj for Record Type Issue 20220421
+ }
return payloadJson;
},
queryBack:function (data) {
@@ -123,7 +126,7 @@
}
var staticResources = JSON.parse('{!staticResource}');
- var staticResourceAWSContact = JSON.parse('{!staticResourceAWSContact}');
+ var staticResourceAWSContact = JSON.parse('{!staticResourceAWSContact}');
var requiredFieldAPIList = JSON.parse('{!requiredFieldAPIListStr}');
var fieldAPIToLabelMap = JSON.parse('{!fieldAPIToLabelMapStr}');
@@ -132,7 +135,7 @@
function ProcessPI(sobjJson, payloadForNewPI) {
blockme();
if ({!isNewMode} || {!isCloneMode}) {
- NewPIToAWS(sobjJson, payloadForNewPI)
+ NewPIToAWS(sobjJson, payloadForNewPI)
}else {
UpdatePIToAWS(sobjJson, payloadForNewPI)
}
@@ -160,8 +163,8 @@
}
return ['input','select','textarea'].indexOf(tag_name.toLowerCase())>-1;
}
-
- function IsFormElement(e){
+
+ function IsFormElement(e){
return IsFormTag(e.tagName);
}
@@ -422,7 +425,7 @@
let dataId = contactsInfo[sfId];
if(dataId){
- AWSService.query(staticResourceAWSContact.queryUrl,dataId,function(result){
+ AWSService.query(staticResourceAWSContact.queryUrl,dataId,function(result){
if(result.object){
document.querySelector("[data-id='Contact__c']").value = result.object.lastName;
}
@@ -464,7 +467,7 @@
<img src="/img/s.gif" alt="" class="minWidth" title="" width="1" height="1" />
<h2 class="mainTitle">{! SobjectLabel}<apex:outputText rendered="{!isNewMode || isCloneMode}">{!$Label.New}</apex:outputText><apex:outputText rendered="{!not(isNewMode || isCloneMode)}">{!$Label.Edit}</apex:outputText></h2>
</td>
- <td class="pbButton" id="topButtonRow">
+ <td class="pbButton" id="topButtonRow" style="pointer-events: none; opacity: 0.4;">
<input class="btn" type="Button" value="{!$Label.Save}" onclick="saveSobjectProcess()" />
<input class="btn" type="Button" value="{!$Label.SaveAndNew}" onclick="saveSobjectProcess(1)" />
<apex:commandButton action="{!cancel}" value="{!$Label.Cancel}" />
@@ -486,8 +489,10 @@
<!--Each section has layoutFields, let's iterate them as well-->
<apex:repeat value="{!layoutSection.layoutFields}" var="layoutField">
- <apex:inputField styleClass="{!ApiPrefix} {!ApiPrefix}_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Agency_Contact__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)}"
+ <apex:inputField styleClass="{!ApiPrefix} {!ApiPrefix}_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Agency_Contact__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&&layoutField.fieldAPI!='RecordTypeId'}"
required="{!layoutField.isRequired}" />
+ <apex:outputField styleClass="PIBackApi PIBackApi_{!layoutField.fieldAPI}" html-data-id="{!layoutField.fieldAPI}" value="{!Agency_Contact__c[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&&layoutField.fieldAPI=='RecordTypeId'}"
+ />
<apex:pageblocksectionitem rendered="{!layoutField.isPlaceHolder}">
</apex:pageblocksectionitem>
</apex:repeat>
@@ -495,7 +500,7 @@
</apex:pageBlockSection>
</apex:repeat>
<script>
- var init_nodes = document.getElementsByClassName("PIBackApi");
+ var init_nodes = document.getElementsByClassName("PIBackApi");
var api_id_map={};
for(let ei in init_nodes){
let e = init_nodes[ei];
@@ -508,7 +513,7 @@
}
console.log(api_id_map);
sfdcPage.appendToOnloadQueue(function () {
- jQuery('option').each(function(i,e){
+ jQuery('option').each(function(i,e){
if(e.value == '_\x01_'){
e.value = '';
}
@@ -538,6 +543,8 @@
}
jQuery('a[data-id="OwnerId"]').remove();
+ document.getElementById('topButtonRow').style = '';
+聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 document.getElementById('bottomButtonRow').style = '';
/*
jQuery(".lookupInput").each(function(i,e){
let je =jQuery(e).find('input');
@@ -606,7 +613,7 @@
<tr>
<td class="pbTitle">
<img src="/img/s.gif" alt="" class="minWidth" title="" width="1" height="1" /> </td>
- <td class="pbButtonb" id="bottomButtonRow">
+ <td class="pbButtonb" id="bottomButtonRow" style="pointer-events: none; opacity: 0.4;">
<input class="btn" type="Button" value="{!$Label.Save}" onclick="saveSobjectProcess()" />
<input class="btn" type="Button" value="{!$Label.SaveAndNew}" onclick="saveSobjectProcess()" />
<apex:commandButton action="{!cancel}" value="{!$Label.Cancel}" />
--
Gitblit v1.9.1