Skip to content

Instantly share code, notes, and snippets.

@cgillis-aras
Last active November 6, 2017 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgillis-aras/fa0704b43c15d5e479be5f2f30c0faf6 to your computer and use it in GitHub Desktop.
Save cgillis-aras/fa0704b43c15d5e479be5f2f30c0faf6 to your computer and use it in GitHub Desktop.
// 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
};
// Open the dialog
var topWnd = top.aras.getMostTopWindowWithAras();
var wnd = topWnd ? topWnd : window;
var res = wnd.aras.modalDialogHelper.show('DefaultModal', wnd, param, options, 'ShowFormAsADialog.html');
if (res) {
alert(res.usersName + " loves learning about modal dialogs!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment