| | |
| | | //新建 |
| | | function NewPIToAWS(reportJson, payloadForNewPI) { |
| | | let controllerSaveMethod = '{!$RemoteAction.NewAndEditReportController.saveReport}'; |
| | | AWSService.insert(staticResources.newUrl, reportJson, payloadForNewPI, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, true, insertOrUpdateBack, redirectCallBack); |
| | | AWSService.insert(staticResources.newUrl, reportJson, payloadForNewPI, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, {!isNewMode}, insertOrUpdateBack, redirectCallBack); |
| | | } |
| | | |
| | | //编辑 |
| | |
| | | } else { |
| | | payloadJson.AWS_Data_Id__c = '{!AWSDataId}'; |
| | | } |
| | | if('{!sfRecordIdForEdit}'){ |
| | | payloadJson.Id = '{!sfRecordIdForEdit}'; |
| | | } |
| | | if('{!rtTypeId}'){ |
| | | payloadJson.RecordTypeId = '{!rtTypeId}';//Add by Li Jun for Record Type Issue 20220421 |
| | | } |
| | |
| | | //Replace Vlookup Field |
| | | replaceSearchContactLookup(); |
| | | //3. Set Readonly Attribute |
| | | document.querySelector("[data-id='OwnerId']").classList.add("disabledbutton"); |
| | | if(document.querySelector("[data-id='OwnerId']")) |
| | | document.querySelector("[data-id='OwnerId']").classList.add("disabledbutton"); |
| | | |
| | | //如果是OPD计划过来的 |
| | | if('{!no1Name}' != '' && '{!no1Id}' != ''){ |