Open an entity form in the create mode within a dialog box pop-up in model driven app power apps javascript
The below code will be used to Open an entity form in the create mode within a dialog box pop-up.
JavaScript
var pageInput = {
pageType: "entityrecord",
entityName: "contact"
};
var navigationOptions = {
target: 2,
height: {value: 80, unit:"%"},
width: {value: 70, unit:"%"},
position: 1
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
function success(result) {
console.log("Record created with ID: " + result.savedEntityReference[0].id +
" Name: " + result.savedEntityReference[0].name)
// Handle dialog closed
},
function error() {
// Handle errors
}
);
JavaScriptHope it helps.