Client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 10:36 PM
when the user create the problem record , you should show the message of total number of records created by the currently log in user for the problem table using OOB problem table ?
Using the After BR but i need to same scenaior build the client side script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 11:12 PM
What is the requirement behind this? What issue will showing this information solve?
You are running client side scripts to show a user what he already knows (for which you probably should use GlideAjax, because using gliderecord isn't best practice.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 11:25 PM
@Ram012 You can either use a combination of g_scratchpad +Display business rule + client script to show this information to the user or use GlideAjax call in client script to call a server side script include to get this information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 11:38 PM
Hi Sandeep ,
Thanks for quick response , but can you share the exact code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 11:45 PM
Hello,
I recommend using GlideAjax. Please find the below scipt.
Client Script:
var user = g_form.getUniqueValue();
var ga = new GlideAjax('script_include_name');
ga.addParam('sysparm_name', script_include_function_name);
ga.addParam('sysparm_user', user);
ga.getXML(callback);
function callback(response){
var answer = response.responseXML.documentElement.getAttribute("answer"); // 'answer' variable contains the total number of problem records.
Script Include: Should be client callable.
script_include_function_name: function() {
var user = this.getParameter('sysparm_user');
return totalRecords;
}