Check if in Service Portal or Classic UI, and display message (catalog client script)

 

if (typeof spModal != 'undefined') {

                     // Portal

                     spModal.alert(sAlertMessage);

                }

                else {

                     // Desktop UI

                     var gm = new GlideModal();

                     gm.setTitle("Warning");

                     gm.renderWithContent(sAlertMessage);

                }

Comments

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

Running transform maps asynchronously