@Polshgiant - Thank you! I was having this exact issue, and even though I had referenced the parent entity id correctly, I didn't do the same for the openQuickCreate call. I only wish I had found this answer 10 hours ago. Here's my complete code, in case anyone needs it (or can offer suggestions how to improve it):
function YOURFUNCTIONNAME() {
var parentContact = {
entityType: "contact",
id: window.parent.Xrm.Page.data.entity.getId().substring(1, 37)
};
// You can set parameters here to pre-fill the form; I haven't
var parameters = {
};
parent.Xrm.Utility.openQuickCreate("YOURLOGICALENTITYNAME", parentContact, parameters)
.then(function(lookup) { successCallback(lookup); }, function(error) { errorCallback(error); });
function successCallback(lookup) {
alert("lookup: " + lookup.savedEntityReference.id);
alert("lookup: " + lookup.savedEntityReference.name);
}
function errorCallback(e) {
alert("Error: " + e.errorCode + " " + e.message);
}
}