From e19c35a6d99fd792106d925ae03e8ae3cef3f6b3 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期三, 20 四月 2022 16:44:06 +0800
Subject: [PATCH] Insert log issue
---
force-app/main/default/pages/NewAndEditAgencyContact.page | 38 ++++++++++++++++++++++++--------------
1 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/force-app/main/default/pages/NewAndEditAgencyContact.page b/force-app/main/default/pages/NewAndEditAgencyContact.page
index 5230dab..1eb6a14 100644
--- a/force-app/main/default/pages/NewAndEditAgencyContact.page
+++ b/force-app/main/default/pages/NewAndEditAgencyContact.page
@@ -63,6 +63,7 @@
payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
if (isNewMode || {!isCloneMode}) {
payloadJson.AWS_Data_Id__c = r.object[0].dataId;
+ delete payloadJson.OwnerId;
} else {
payloadJson.AWS_Data_Id__c = '{!AWSDataId}';
}
@@ -122,6 +123,8 @@
}
var staticResources = JSON.parse('{!staticResource}');
+ var staticResourceAWSContact = JSON.parse('{!staticResourceAWSContact}');
+
var requiredFieldAPIList = JSON.parse('{!requiredFieldAPIListStr}');
var fieldAPIToLabelMap = JSON.parse('{!fieldAPIToLabelMapStr}');
console.log('{!staticResource}');
@@ -129,7 +132,7 @@
function ProcessPI(sobjJson, payloadForNewPI) {
blockme();
if ({!isNewMode} || {!isCloneMode}) {
- NewPIToAWS(sobjJson, payloadForNewPI)
+ NewPIToAWS(sobjJson, payloadForNewPI)
}else {
UpdatePIToAWS(sobjJson, payloadForNewPI)
}
@@ -157,8 +160,8 @@
}
return ['input','select','textarea'].indexOf(tag_name.toLowerCase())>-1;
}
-
- function IsFormElement(e){
+
+ function IsFormElement(e){
return IsFormTag(e.tagName);
}
@@ -418,12 +421,15 @@
let contactsInfo = JSON.parse('{!LookUpOverrideFieldsMapJson}');
let dataId = contactsInfo[sfId];
- AWSService.query(staticResourcesContact.queryUrl,dataId,function(result){
- if(result.object){
- document.querySelector("[data-id='Contact__c']").value = result.object.lastName;
- }
-
- },staticResources.token);
+ if(dataId){
+ AWSService.query(staticResourceAWSContact.queryUrl,dataId,function(result){
+ if(result.object){
+ document.querySelector("[data-id='Contact__c']").value = result.object.lastName;
+ }
+
+ },staticResources.token);
+ }
+
}
</script>
@@ -458,7 +464,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}" />
@@ -480,8 +486,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>
@@ -489,7 +497,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];
@@ -502,7 +510,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 = '';
}
@@ -532,6 +540,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');
@@ -600,7 +610,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