What does this code means? ScriptInclude "CMSEntryPage"

Asami
Tera Contributor

The property "glide.entry.page.script" has value as "new CMSEntryPage().getEntryPage()"

I checked the script include "CMSEntryPage". But it has a code which I am not able to understand.

what does this code means?

 

<CMSEntryPage>

var CMSEntryPage = Class.create();

CMSEntryPage.prototype = {
  initialize : function() {
  },

  getEntryPage : function() {
    var config = GlideContentConfig.get();
    if (!config.getLoginPage())
        return null;

    return new GlideCMSPageLink().getPageLink(config.getLoginPage());
  }
}
1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

That script include is used to determine where user has to be redirected once user logins to the instance.

more details below

How to configure redirection for Service Portal

https://serviceportal.io/docs/documentation/sso_configuration.md

6 ways to set up your Service Portal for redirection SUCCESS!

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

That script include is used to determine where user has to be redirected once user logins to the instance.

more details below

How to configure redirection for Service Portal

https://serviceportal.io/docs/documentation/sso_configuration.md

6 ways to set up your Service Portal for redirection SUCCESS!

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Asami 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Aman Singh_
Kilo Sage

Ct111
Giga Sage

As far as I remember this property "glide.entry.page.script" was used for redirection of login page

as per the user roles.

 

And regarding GlideContentConfig  I am afraid there is not much documentation available at the moment.

However, I would recommend you to check  this link especially the section of

"User login directly through Service Portal"

 

I believe the code you have pasted is the default one which works after logging in .