В нашей Dynamics 365 Например, мы пытаемся открыть быстро создать форму для объекта называется SourceAssessment
использованием code example hereНевозможно открыть быстро создать форму
var thisEntity = {
entityType: "SourceAssessment",
id: Xrm.Page.data.entity.getId()
};
var callback = function (obj) {
console.log("Created new " + obj.savedEntityReference.entityType + " named '" +
obj.savedEntityReference.name + "' with id:" + obj.savedEntityReference.id);
}
var setName = { name: "Child account of " + Xrm.Page.getAttribute("name").getValue()
};
Xrm.Utility.openQuickCreate("SourceAssessment", thisEntity, setName).then(callback, function
(error) {
console.log(error.message);
});
- Линия
Xrm.Page.data.entity.getId()
бросаетUncaught TypeError: Cannot read property 'entity' of null(…)
- линия
Xrm.Page.getAttribute("name").getValue()
бросаетUncaught TypeError: Cannot read property 'getValue' of null(…)
- Линия
Xrm.Utility.openQuickCreate("SourceAssessment", thisEntity, setName).then(callback, function (error) {
console.log(error.message);
});
бросает
The entityLogicalName isn't valid. This value can't be null or empty, and it must represent an entity in the organization.
Где вы выполняете этот код? Внутри CRM? – Sxntk
@Sxntk In Console – xameeramir
Внесите свой код и выполните его после Xrm.Entity.data.entity не определено, чтобы вы могли видеть, не слишком ли вы его вызываете. – Sxntk