| | |
| | | function checkRequiredFieldMsg(formData) { |
| | | let blankRequiredFields = ''; |
| | | for(i = 0;i<requiredFieldAPIList.length;i++){ |
| | | if(formData[requiredFieldAPIList[i]]){ |
| | | if (formData[requiredFieldAPIList[i]] && !VLookUpFields.has(requiredFieldAPIList[i])) { |
| | | continue; |
| | | }else if(VLookUpFields.has(requiredFieldAPIList[i]) && formData[requiredFieldAPIList[i]] != '000000000000000'){ |
| | | continue; |
| | | }else{ |
| | | if(blankRequiredFields == ''){ |
| | |
| | | //新建 |
| | | 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}' != ''){ |