CustomEvent.observe in UI16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2016 11:16 AM
I have a requirement to display a disclaimer alert when a user initially logs into the instance. Before upgrading to Helsinki and UI16, I utilized a global UI Script with the following code:
CustomEvent.observe('user.login',function(){alert('Custom Alert');});
Now with UI16, I've noticed that this functionality no longer works. I'm not sure if its because the custom user.login event is no longer being created, or some other reason.
Has anyone else come up with a solution to display an alert when a user initially logs into the instance using UI16?
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2018 02:55 PM
Please share your answer if you know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2018 03:45 PM
So there's two things go on here.
Firstly, CustomEvent no longer exists in the global scope (see my explanation here). You can find it in either
CustomEventManager
or
NOW.CustomEvent
(at least in London).
Secondly, I don't think user.login is an event that is fired anymore. You can actually inspect the events that are registered through
NOW.CustomEvent.events
or
CustomEventManager.events
The list of registered events I can see in London are below. "user.login" is not there, and I can't see any in the list that would be a suitable replacement (but mind you, these are only the ones registered to observe, not what fires). May need to ask someone more in the know.
- sn.form.journal_field.add
- sn.form.journal_field.readonly
- sn.form.journal_field.value
- sn.form.journal_field.mandatory
- sn.form.journal_field.visible
- sn.form.journal_field.label
- sn.form.journal_field.show_msg
- sn.form.journal_field.hide_msg
- sn.form.hide_all_field_msg
- sn.stream.insert
- navigation.complete
- cc_dateformat_set
- cc_dateformat_compact_set
- top-load-tours
- page_loaded_fully
- gtd_child_iframe_loaded
- body_clicked
- application_navigator_keyboard_shortcuts_updated
- magellanNavigator:unstarFavoritedGroup
- magellanNavigator:favoriteSaved
- magellanNavigator:favoritedModuleRemoved
- magellan_EditMode.change
- session_notification
- legacy_session_notification
- glide:ui_notification.update_set_change
- glide:ui_notification.system
- glide:ui_notification.system_event
- glide:ui_notification.error
- glide:ui_notification.info
- connect.notifications.mobile.update
- connect.notifications.desktop.update
- connect.notifications.email.update
- connect.notifications.audio.update
- connect:set_document
- sn.attachment.preview
- overview_help.activate
- sn:refresh_update_set
- magellanNavigator:createFavorite
- magellanNavigator:favoriteGroupSaved
- magellanNavigator:favoriteGroupRemoved
- magellanNavigator:favoriteModuleRemoved
- magellanNavigator:favoriteRemoved
- glide.product.image.light
- glide.product.description
- css.$navpage-header-bg
- css.$navpage-header-color
- css.$navpage-header-divider-color
- css.$navpage-nav-bg
- css.$navpage-nav-bg-sub
- css.$subnav-background-color
- css.$navpage-nav-border
- css.$navpage-nav-color-sub
- css.$navpage-nav-unselected-color
- css.$navpage-nav-selected-color
- css.$nav-highlight-main
- css.$navpage-nav-selected-bg
- css.$nav-hr-color
- user.elevatedRoles.updated
- iframe_form.sysverb_insert
- iframe_form.sysverb_delete
- iframe_form.sysverb_update
- sn:impersonate
- glide:ui_notification.security
- sn:elevate_roles
- magellanNavigator.historyAdded
- magellanNavigator.permalink.set
- glide.product.name
- magellan_collapse.toggle
- navigator.refresh
- glide:nav_open_url
- sn.spa.intercept
- embedded_help.guided_setup.enable
- embedded_help.guided_setup.disable
- embedded_help:tour.start
- embedded_help:tour.end
- embedded_help:load_embedded_help
- embedded_help:help_pane.toggle
- sn:change_update_set
- glide:ui_notification.application_change
- sn:refresh_application_picker
- sn:change_application
- connect:conversation_list:state
- connect:message_notification.update
- embedded_help:help_pane:state
- embedded_help:content.load
- request_start
- load_page_request_start
- request_complete
- load_page_request_complete
- clear_message
- compact
- connect:conversation_list.toggle
- connect:open_group
- connect:follow_document
- connect:unfollow_document
- chat:open_conversation