You need to sign in to do that
Don't have an account?
alok garg 17
Uncaught Error in $A.getCallback() [Cannot read property 'record' of null]
I am getting technical error while implementing the 39.0 version for lightning project.
Its happening while I am saving logs using the savelog() function.
Error Message from salesforce:
=========================================================================
"This page has an error. You might just need to refresh it. First, would you give us some details? (We're reporting this as error ID: -863164446)."
=========================================================================
Technical Error description from salesforce:
=========================================================================
Uncaught Error in $A.getCallback() [Cannot read property 'record' of null]
Callback failed: serviceComponent://ui.force.components.controllers.recordGlobalValueProvider.RecordGvpController/ACTION$createRecord
throws at https://liveopstest2-dev-ed.lightning.force.com/auraFW/javascript/uUttwQR-pk5rKvOBHB6bAQ/aura_prod.js:2:15
Object.eval()@libraries/force/recordLibrary/crud.js:12:306
=========================================================================
Can someone please help me to resolve this issue.
Regards,
Alok Garg
Its happening while I am saving logs using the savelog() function.
Error Message from salesforce:
=========================================================================
"This page has an error. You might just need to refresh it. First, would you give us some details? (We're reporting this as error ID: -863164446)."
=========================================================================
Technical Error description from salesforce:
=========================================================================
Uncaught Error in $A.getCallback() [Cannot read property 'record' of null]
Callback failed: serviceComponent://ui.force.components.controllers.recordGlobalValueProvider.RecordGvpController/ACTION$createRecord
throws at https://liveopstest2-dev-ed.lightning.force.com/auraFW/javascript/uUttwQR-pk5rKvOBHB6bAQ/aura_prod.js:2:15
Object.eval()@libraries/force/recordLibrary/crud.js:12:306
=========================================================================
Can someone please help me to resolve this issue.
Regards,
Alok Garg
Please can you post all codes overe here.
Happy Lightning learning
{entityApiName: "Task",
Status : "Completed",
Type : "Call",
CallType : "Inbound",
ActivityDate : "2017-03-01",
CallObject : "1344000557",
Subject : "Call+2%2F14%2F2017+6%3A41+pm",
Description : "testing for lightning development",
CallDurationInSeconds: "33",
WhatId: "0073500000aR4bDRN",
WhoId: "0032800000fL8w2AAC"}
Code Example:
==========================================================================================
//function using to save logs/activities in salesforce.
var saveLogCallback = function(e) {
e.sessionID = fieldsToReturn['sessionID'];
e.requestFieldName = fieldsToReturn['singleFieldName'];
if(e.success == true) {
e.result = e.returnValue.recordId;
}
else {
console.error('Something went wrong! Errors:', e.errors);
return false;
}
that.onTaskSaved(e);
};
//Add OR update logs
if(paramFieldsToSave.Id) { //upating task into salesforce.
sforce.opencti.saveLog({
value: {
Id: paramFieldsToSave.Id
},
callback: saveLogCallback
});
}
else { // creating new task into salesforce.
//setting object for saving logs.
var saveLogParamsObj = {
entityApiName: 'Task',
Status : paramFieldsToSave.Status,
Type : paramFieldsToSave.Type,
CallType : paramFieldsToSave.CallType,
ActivityDate : paramFieldsToSave.Activitydate,
CallObject : paramFieldsToSave.CallObject,
Subject : this.decodeString(paramFieldsToSave.subject),
Description : this.decodeString(paramFieldsToSave.description)
};
//checking if the CallDurationInSeconds
if(typeof paramFieldsToSave.CallDurationInSeconds != 'undefined') {
saveLogParamsObj.CallDurationInSeconds = parseInt(paramFieldsToSave.CallDurationInSeconds);
}
//checking if the account id / related to is selected.
if(paramFieldsToSave.whatId && paramFieldsToSave.whatId != '') {
saveLogParamsObj.WhatId = paramFieldsToSave.whatId;
}
//checking if any contact/lead selected.
if(paramFieldsToSave.whoId && paramFieldsToSave.whoId != '') {
saveLogParamsObj.WhoId = paramFieldsToSave.whoId;
}
sforce.opencti.saveLog({
value : saveLogParamsObj,
callback: saveLogCallback
});
}
==========================================================================================