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-19-2024 12:31 AM
Hi Tripu,
Same code i have write already but where i can check its working not or not as per the requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 01:50 AM
Hi Amar,
You can go through below script whenever record insert or update business rule will show the info message.
(function executeRule(current, previous /*null when async*/) {
// Get the currently logged-in user
var userID = gs.getUserID(); // Query the Problem table to count the number of records created by this user
var problemGR = new GlideRecord('problem');
problemGR.addQuery('opened_by', userID);
problemGR.query(); // Count the records
var recordCount = problemGR.getRowCount(); // Display a message to the user
gs.addInfoMessage('You have created a total of ' + recordCount + ' problem records.');
})(current, previous);
Thanks!