| | |
| | | } 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) { |
| | |
| | | } |
| | | |
| | | 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}'); |
| | |
| | | function ProcessPI(sobjJson, payloadForNewPI) { |
| | | blockme(); |
| | | if ({!isNewMode} || {!isCloneMode}) { |
| | | NewPIToAWS(sobjJson, payloadForNewPI) |
| | | NewPIToAWS(sobjJson, payloadForNewPI) |
| | | }else { |
| | | UpdatePIToAWS(sobjJson, payloadForNewPI) |
| | | } |
| | |
| | | } |
| | | return ['input','select','textarea'].indexOf(tag_name.toLowerCase())>-1; |
| | | } |
| | | |
| | | function IsFormElement(e){ |
| | | |
| | | function IsFormElement(e){ |
| | | return IsFormTag(e.tagName); |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | <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}" /> |
| | |
| | | |
| | | <!--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> |
| | |
| | | </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]; |
| | |
| | | } |
| | | 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 = ''; |
| | | } |
| | |
| | | } |
| | | 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'); |
| | |
| | | <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}" /> |