How do I access the system property in UI page client script?

G Balaji
Kilo Guru

I have system property defined as TimeZone. I want to access it my in UI page client script. How do I do it?

Thanks in advance,

G Balaji

1 ACCEPTED SOLUTION

Thais Pulliam2
Giga Expert

If you want to access a sys property for example on your UI Page HTML, you can use this syntax:

<p>${gs.getMessage(gs.getProperty('property.name.here'))}</p>

View solution in original post

12 REPLIES 12

Gurpreet07
Mega Sage

You have to create a client callable script include and call the same using glideAjax

Thanks for the response.

Chandu Telu
Tera Guru
Tera Guru

HI Balaji,

 

You need create client script linke this

 

var ga = new GlideAjax('HelloWorld');

ga.addParam('sysparm_name', 'helloWorld');

ga.getXML(HelloWorldParse);

 

function HelloWorldParse(response) {

  var answer = response.responseXML.documentElement.getAttribute("answer");

  alert(answer); }

 

Script include

 

var HelloWorld = Class.create();HelloWorld.prototype = Object.extendsObject(AbstractAjaxProcessor, {   helloWorld:function() {  var property = gs.getProperty(“PropertyName”)return property; } ,       } });

 

Hi Chandu,

 

Thanks for the response. May I reuse one of the Script Include that already exist in my instance. If I can use, I believe I should create another function in that Script Include. Am I right?

 

Thanks