- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Did you know that you can access parameters passed to UI page inside UI page client script directly?
Example:
UI Action to invoke UI page:
var gdw = new GlideModal('validate_ui_page'); // name of UI page
gdw.setSize(750,300);
gdw.setPreference('sysparm_tableName', g_form.getTableName());
gdw.render();
UI Page Client Script:
var myModal = GlideModal.prototype.get('validate_ui_page'); // pass name of the UI page for global scope and for scoped app pass the endpoint name without .do extension
var tableName = myModal.getPreference('sysparm_tableName'); // pass name of the parameter mentioned in setPreference() method
If my content helped you in anyway, please mark this content as BOOKMARK, SUBSCRIBE & HELPFUL
Best Regards,
Prashant Kumar (LearnIT)
YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant
Blog LearnIT: https://medium.com/@LearnITbyPrashant
Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/
ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635
- 1,880 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
