I am using lightning:recordForm on my component that is displaying some case data along with the Owner. It's not possible to edit the owner, like it is on the standard one. Is there any way around this?
fields are: CaseNumber,Status,OwnerId,AccountId,Subject,Description
$A.createComponent(
"lightning:recordForm",
{
"aura:id":"caseCompact",
"recordId":cmp.get("v.recordId"),
"recordTypeId":cmp.get("v.recordTypeId"),
"objectApiName":"Case",
"mode":"view" ,
"fields":cmp.get("v.fields"),
"columns":"2",
"onsuccess": cmp.getReference("c.handleSuccessAction"),
"oncancel": cmp.getReference("c.handleCancelAction")
},
function(newForm, status, errorMessage){
//Add the new button to the body array
if (status === "SUCCESS") {
cmp.set("v.body", [newForm]);
}
else if (status === "INCOMPLETE") {
console.log("No response from server or client is offline.")
// Show offline error
}
else if (status === "ERROR") {
console.log("Error: " + errorMessage);
// Show error message
}
}
);