You need to sign in to do that
Don't have an account?
Krishna Katve
Error while saving a record using lightning data service
I am getting below error while saving record using force:recorddata saveRecord methd.
{"state":"ERROR","recordId":null,"error":[{"message":"The requested resource does not exist\n","pageErrors":[{"statusCode":"NOT_FOUND","message":"The requested resource does not exist"}],"fieldErrors":{},"potentialDuplicates":[]}],"entityApiName":null,"action":{}}
Interesting thing about this is record is getting created in salesforce but respose is coming as error. Please check below save record call
Please advise.
Thanks
{"state":"ERROR","recordId":null,"error":[{"message":"The requested resource does not exist\n","pageErrors":[{"statusCode":"NOT_FOUND","message":"The requested resource does not exist"}],"fieldErrors":{},"potentialDuplicates":[]}],"entityApiName":null,"action":{}}
Interesting thing about this is record is getting created in salesforce but respose is coming as error. Please check below save record call
component.find("apiRequestCreator").saveRecord(function(saveResult) { console.log("-----Save Result--"+JSON.stringify(saveResult)); if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") { // record is saved successfully component.set("v.message","API Request submitted successfully. Download API key from Display APi Request tab."); helper.uploadFiles(component, saveResult.recordId); } else { component.set("v.message"," Error occurred while submitting request, Please contact varian helpdesk."); component.set("v.hasErrors", true); console.log('Unknown problem, state: ' + saveResult.state + ', error: ' + JSON.stringify(saveResult.error[0])+'---'+saveResult.error[0].pageErrors[0].statusCode); if(saveResult.error[0].pageErrors[0].statusCode == "DUPLICATE_VALUE"){ var apiTypeKey = component.get("v.customerDetails.Software_System__c")+", "+component.get("v.customerDetails.API_Type__c"); if(!$A.util.isEmpty(component.get("v.customerDetails.X3rd_party_Software__c"))){ apiTypeKey = apiTypeKey + ", "+ component.get("v.customerDetails.X3rd_party_Software__c"); } component.set("v.message","You have already submitted request for "+apiTypeKey); }else{ component.set("v.message"," Error occurred while submitting request, Please contact varian helpdesk."); } } });
Please advise.
Thanks
Check this link for more information : https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_considerations.htm