
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2020 11:47 PM
Hi,
How can we use/call system property in client controller of a widget??
Thanks,
Rohit
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2020 12:16 AM
Hi,
You can store the system property in the data object in the server side section and reference the same thing in the client script of the widget .
eg:-
// Server side
(function() {
data.propertyValue = gs.getProperty('your property name');
}();
//Client side
api.controller = function() {
var c = this;
console.log('Property value = ' + c.data.propertyValue);
}
Thanks
Sourav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2020 11:54 PM
Hi,
Possibly you will have to use GlideAjax to get that value
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2020 12:16 AM
Hi,
You can store the system property in the data object in the server side section and reference the same thing in the client script of the widget .
eg:-
// Server side
(function() {
data.propertyValue = gs.getProperty('your property name');
}();
//Client side
api.controller = function() {
var c = this;
console.log('Property value = ' + c.data.propertyValue);
}
Thanks
Sourav