How to call system property in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:03 AM
Hi All,
I have a requirement like
Currently we have On change client script on one catalog item. In that CS we are using widget sys_id for making functionality.
Customer wants to call to sys_id from system property
// var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
var css_text = '<style> p{color: red;}' +
'</style>';
var html2 = css_text + html1;
//
// Use spModal to pop the HTML
if (newValue == 'Yes') {
spModal.open({
title: 'Please provide your response below: ',
widget: '5587c46e47e9611053b8bb1e436d4385',
buttons: [{
label: 'No',
cancel: true
}, {
label: 'Yes',
primary: true
}]
}).then(function(answer) {
g_form.setValue('this_issue', 'Yes');
}, function() {
g_form.setValue('issue', 'No');
});
}
}
I have created a new sys property and stored the sys_id, need to call sys property into Client script. can any one help me on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:17 AM
Hi @praveen47,
You can either use an AJAX call to fetch the data or use a Display Business Rule and save the property in the g_scratchpad variable.
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:20 AM - edited 03-21-2024 02:20 AM
Hi @praveen47 you cannot call system property directly in client script, you can use display business rule or client callable script include.
for your scenario you need a client callable script include
Harish