change the value of "glide.ui.session_timeout" with using script

Pooja Sonone
Tera Contributor
    • check whether the property exists
    • Prints the current Value to some log if the property exists( using log() methods in script 
    • Update the value of the target property with a given Value
  • Try to change the value of "glide.ui.session_timeout"
  • Research some properties which users tend to hope to change

this is my requirement for i want the property value should be update with script (value =180) and existing property will print the log massage (value =90)

find_real_file.png

1 ACCEPTED SOLUTION

Community Alums
Not applicable

You can use the methods i mentioned in my answer!!

I think with Fix scripts it's a No NO.

Glad to see my answer helped You. 
Kindly mark the applicable answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

View solution in original post

4 REPLIES 4

Community Alums
Not applicable

Hi @Pooja Sonone ,

Ideally we do it manually :

Type sys_properties.list in the Navigation Filter

Search for existing 'System Property' by opening up the filter and then set the filter as 'Name' contains 'Session'

System Property = glide.ui.session_timeout

Under the 'Value' field type the required value in minutes. (for example, 60 - meaning 1 hour or 120 - meaning 2 hours)

If you want to run this in background-scripts:

gs.setProperty('glide.ui.session_timeout','120');

This is working in my instance , see below for the output:

find_real_file.png

If you want to use a Script action then use this approach , just use your property name and value:

https://community.servicenow.com/community?id=community_question&sys_id=328447a9dbd8dbc01dcaf3231f96...

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Pooja Sonone
Tera Contributor

Hi Sandeep,

Thanks for the solution.

On my PDI its working for background script but I want to write this code is fixscript so write and run so it gives me error. as shown in image

and also I have to to print the current system property time.

  • Prints the current Value to some log if the property exists( using log() methods in script 

find_real_file.png

Community Alums
Not applicable

You can use the methods i mentioned in my answer!!

I think with Fix scripts it's a No NO.

Glad to see my answer helped You. 
Kindly mark the applicable answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

Hi Sandeep,

Thanks for the resolving the query 

I want to confirm that why u said "No NO" for use fix script to change the system property as below?

let me know if ServiceNow not recommended use or that will have any impact on service now system properties ?