- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2023 02:18 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2023 11:45 AM
Hi @Dipu_9999,
You can use below script it will work
if (newValue != "") {
var ga = new GlideAjax('SBIncidentUtils');
ga.addParam('sysparm_name', 'getLocationDetails');
ga.addParam('sysparm_location', newValue);
ga.getXMLAnswer(updateField);
} else {
// Clear the info message if newValue is empty
g_form.hideFieldMsg('cmn_Location');
}
function updateField(answer) {
if (answer != "noValue" && answer != '') {
g_form.showFieldMsg('cmn_Location', answer, 'info', true);
} else {
// Clear the info message if answer is "noValue" or empty
g_form.hideFieldMsg('cmn_Location');
}
}
Please mark helpful and solution proposed if it works.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2023 11:45 AM
Hi @Dipu_9999,
You can use below script it will work
if (newValue != "") {
var ga = new GlideAjax('SBIncidentUtils');
ga.addParam('sysparm_name', 'getLocationDetails');
ga.addParam('sysparm_location', newValue);
ga.getXMLAnswer(updateField);
} else {
// Clear the info message if newValue is empty
g_form.hideFieldMsg('cmn_Location');
}
function updateField(answer) {
if (answer != "noValue" && answer != '') {
g_form.showFieldMsg('cmn_Location', answer, 'info', true);
} else {
// Clear the info message if answer is "noValue" or empty
g_form.hideFieldMsg('cmn_Location');
}
}
Please mark helpful and solution proposed if it works.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2023 01:38 AM
Thanks