- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2025 05:39 AM
Hello guys,
we tried to implement a new modal on one of our Ui action triggered by a button on the change_task table.
Unfortunetly we got an error in the logs:
com.glide.script.RhinoEcmaError: “GlideModal“ is not defined
we have checked the « client » checkbox on our Ui action.
we have unchecked the « isolate script » checkbox on our Ui action.
Here is the code used to create our modal in the ui action, as you will see, we almost made a copy/paste of the official documentation:
var dialog;
var dialogClass = window.GlideModal ? GlideModal :GlideDialogWindow;
dialog = newdialogClass('change_exception_gel_modal');
//Set the dialog title
dialog.setTitle('TEST');
dialog.setPreference('onPromptComplete', doComplete);
dialog.setPreference('onPromptCancel', doCancel);
//Opens the dialog
dialog.render();
Thanks in advance for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 04:04 AM
Hello everyone,
I figured out what was the issue there.
In UI action depending on where your lines are in the script field it will either run on client side or in server side.
I forgot about it and I was trying to call the dialog class on the server side part of my script.
Solution: check that you are in the good part of your script, if you want to call class or object from ClientAPI be sure that your definitions or calls are made in the scope of the function defined in the field "Onclick" of your UI Action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 04:04 AM
Hello everyone,
I figured out what was the issue there.
In UI action depending on where your lines are in the script field it will either run on client side or in server side.
I forgot about it and I was trying to call the dialog class on the server side part of my script.
Solution: check that you are in the good part of your script, if you want to call class or object from ClientAPI be sure that your definitions or calls are made in the scope of the function defined in the field "Onclick" of your UI Action.