Created
November 3, 2017 20:44
-
-
Save cgillis-aras/4ba88493409e5aca8edd37073f8d2399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We need to pass the ID of the form into the dialog | |
var formNd = top.aras.getItemByName("Form", "Dialog Example", 0); | |
// Set the arguments being passed to the dialog | |
var param = { | |
title: "Dialog Example", | |
aras: top.aras, | |
formId: formNd.getAttribute("id"), | |
isEditMode: true | |
}; | |
// Set the size of the resuling dialog | |
var options = { | |
dialogWidth: 500, | |
dialogHeight: 250 | |
}; | |
// This will be called after the dialog is closed | |
var callback = { | |
oncancel: function(dialogWrapper) { | |
var res = dialogWrapper.result; | |
if (res.usersName) { | |
alert(res.usersName + " loves learning about dialogs!"); | |
} | |
} | |
}; | |
// Open the dialog | |
var topWnd = top.aras.getMostTopWindowWithAras(); | |
var wnd = topWnd ? topWnd : window; | |
wnd.aras.modalDialogHelper.show('DefaultPopup', wnd, param, options, 'ShowFormAsADialog.html', callback); | |
alert("Before the dialog"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment